title: Java 8 Optional ifPresent() vs != null
body: <p>I understand that Optionals ifPresent() call is meant to replace a null check.  Pulling code examples from the Oracle documentation, it appears to be very useful in simple situations. For example:</p>
  
  <pre><code>Optional&lt;Soundcard&gt; soundcard = ...;
  soundcard.ifPresent(System.out::println);
  </code></pre>
  
  <p>I just want to understand <em>why</em> this is considered better than a null check. Readability? Performance? It seems to me that this would cause a hit to project performance, as a new object must be introduced in order to hold the object we ultimately wish to obtain?  In full, why is <em>this</em> <code>soundcard.ifPresent()</code></p>
  
  <p>considered better than <em>this</em> <code>if(soundcard != null)</code>.</p>