title: How to use Java optional operator to map more than one subtype
body: <p>I want to use the java Optional operator to avoid nullchecks like:</p>
  
  <pre><code>if(outher != null &amp;&amp; outher.getNested() != null &amp;&amp;
            outher.getNested().getInner() != null &amp;&amp; outher.getNested().getAnotherInner() != null)
  </code></pre>
  
  <p>I looked up some tutorials at the internet + Java cheatsheet but didn't find how to resolve the:<code>outher.getNested.getInner() != null &amp;&amp; outher.getNested.getAnotherInner != null</code> part.</p>
  
  <p>So how to do that correctly something like:</p>
  
  <pre><code>Optional.of(outher)
  .map(Outher::getNested)
  .map(Nested::getInner)
  .map(Nested::getAnotherInner)
  .isPresent();
  </code></pre>
  
  <p>would be awesome</p>