title: Does the .containsKey() method return null pointer exception?
body: <p>I have a hashmap and I need to check if a certain value is present as a key in the hashmap. The problem is the first time I need to perform the check, the hashmap can be empty or null. Will the .containsKey() do the job of returning false if the hashmap is null or empty in this case or should I add an additional null pointer check?</p>
  
  <pre><code>Map&lt;String, String&gt; groupNameMap = new LinkedHashMap&lt;String, String&gt;();
  if(abc!= null &amp;&amp; !groupNameMap.containsKey(abc)){
          usersGroupName = getGroupName(abc,xyz,oci);
  
  
          }
  </code></pre>
  
  <p>Will this piece of code solve the problem? the groupNameMap can be either empty or null.</p>