title: Is Catching a Null Pointer Exception a Code Smell?
body: <p>Recently a co-worker of mine wrote in some code to catch a null pointer exception around an entire method, and return a single result. I pointed out how there could've been any number of reasons for the null pointer, so we changed it to a defensive check for the one result.</p>
  
  <p>However, catching NullPointerException just seemed wrong to me. In my mind, Null pointer exceptions are the result of bad code and not to be an expected exception in the system.</p>
  
  <p>Are there any cases where it makes sense to catch a null pointer exception? </p>