title: prevent null pointer in map() reduce() of java 8 for BigDecimal additions
body: <p>I am trying to add all the prices of given products as:</p>
  <pre><code> BigDecimal getTotalPrice(List&lt;Product&gt; products) {
          return products.stream()
                  .map(Product::getPrice)
                  .peek(bigDecimal -&gt; System.out.println(bigDecimal))
                  .reduce(BigDecimal.ZERO, BigDecimal::add);
      }
  </code></pre>
  <p>I tried printing all the values of <code>bigDecimal</code>, whenever we get value as <code>null</code> we are getting <code>java.lang.NullPointerException</code>, is there any better way to addition in the <code>java 8</code> by preventing any kind of Exceptions?</p>