title: Add element to Set when Set is the value of a Hashmap
body: <p>This is my Map</p>
  
  <pre><code>HashMap&lt;String, Set&lt;String&gt;&gt; hmap = new HashMap&lt;&gt;();
  </code></pre>
  
  <p>I want to retrieve a <code>Set</code> from my <code>Map</code> and add an element to it.</p>
  
  <pre><code>Set&lt;String&gt; val = hmap.get(key);
  val.add(newElement);    //NPE
  hmap.put(key, val);
  </code></pre>
  
  <p>but I get <code>NullPointerException</code> on the <code>val.add</code> line</p>
  
  <p>This is probably trivial, but I don't see it.. </p>
  
  <p>What am I missing?</p>