Check for non-null parent before delegating to it
am: 3a74243ae4

Change-Id: I294345cde604bf61175297ceb5ab11d23dbf6eb7