Merge "Check pointer for null before dereferencing"