am: d7b61ca662 * commit 'd7b61ca6620565cad00de91284ecdfb93ddfbd50': Check NPE beforehand instead of catching it at runtime