title: Attempt to invoke virtual method 'boolean java.util.ArrayList.add(java.lang.Object)' on a null object reference
body: <p>I am trying to build new hashmap with arraylist from old hashmap, but I get this error</p>
  
  <p>Error:</p>
  
  <pre><code>ava.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.util.ArrayList.add(java.lang.Object)' on a null object reference
  </code></pre>
  
  <p>I know it is error with some initialisation but can not catch it</p>
  
  <p>code</p>
  
  <pre><code>  nMap = new HashMap&lt;String, ArrayList&lt;Integer&gt;&gt;();
          for (String type: allTypes) {
              if (oData.get(type).size() &gt; 0) {
                      arraySort(oData.get(type));
                      nData.get(type).add(fData.get(type).get(0).value);
                 }
          }
  </code></pre>
  
  <p>OData is old hashmap that contains data for sure...</p>