Add the null ptr check that's not merged in master

ag/1379112 merged to DR branch had an extra null ptr check,
this shouldn't really happen but merge it to master to keep
the branch consistent.

Change-Id: I5047188729be26a7b7190b2ab3f5d8274bca32d5
1 file changed