Add null checks

Added null checks identified by static analysis tool.

Change-Id: I5ff04775313b06d549c5ae97e497dd44e9231b04
1 file changed