title: Null check in map gets null pointer exception
body: <p>I am trying to use a Java <code>HashMap</code>. Using <code>map.get("A")</code> to get a value for a key from the map resulted in a <code>NullPointerException</code>. Then I used <code>if(map.get("A"))</code> to avoid a <code>NullPointerException</code> being thrown, but it gets thrown anyway.</p>
  
  <p>What am I doing wrong?</p>