am 876881b2: Merge "Add missing null checks after allocations."

* commit '876881b22ad5d735cdb3ae2ac1afa6c336378808':
  Add missing null checks after allocations.