Merge "Check NPE beforehand instead of catching it at runtime" into cw-e-dev am: e56f7b0d1d am: bef0525c38
am: e4db3f0757

* commit 'e4db3f0757fccdf26d98ab4295ac4828a479e8eb':
  Check NPE beforehand instead of catching it at runtime