title: Stream API: create empty map with keys from enum
body: <p>I have following enum:</p>
  
  <pre><code>public enum ProductType {
      RED_MEAT, POULTRY, FISH, EGGS, NUTS, DAIRY, CERIALS_AND_GRAINS, FRUIT, VEGETABLES, OIL_AND_SUGARS
  }
  </code></pre>
  
  <p>I would like to create map with keys from the <code>enum</code> and null values. I tried according to <a href="https://stackoverflow.com/a/31113139/3014866">this answer</a> following code:</p>
  
  <pre><code>Map&lt;ProductType, DietFrequency&gt; diet = Arrays.stream(ProductType.values())
          .collect(Collectors.toMap(productType -&gt; productType, value -&gt; null));
  </code></pre>
  
  <p>But I am getting <code>NullPointerException</code> here. What am I doing wrong? </p>