Please throw `NullPointerException` instead

(also, use braces for the `if` statement)