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

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