title: Java: Can't check the boolean for null
body: <p>if a HashMap is empty and I check for <code>.containsKey()</code>
  I get a null answer.</p>
  
  <p>My Problem is that If I want to check for null I get an error message</p>
  
  <pre><code>if(containsKey == null || !containsKey){
  </code></pre>
  
  <p>I receive the error message</p>
  
  <pre><code>Operator '==' cannot be applied to 'boolean', 'null'
  </code></pre>
  
  <p>Can someone tell me why this is happening. I thought that this should work</p>