title: Are keySet entries of a WeakHashMap never null?
body: <p>If I iterate over the key set of a WeakHashMap, do I need to check for null values?</p>
  
  <pre><code>WeakHashMap&lt;MyObject, WeakReference&lt;MyObject&gt;&gt; hm
      = new WeakHashMap&lt;MyObject, WeakReference&lt;MyObject&gt;&gt;();
  
  for ( MyObject item : hm.keySet() ) {
      if ( item != null ) { // &lt;- Is this test necessary?
          // Do something...
      } 
  }
  </code></pre>
  
  <p>In other words, can elements of the WeakHashMap be collected while I am iterating over them?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>For the sake of this question, one can assume that no <code>null</code> entries is added in the hash map.</p>