title: Avoid NoSuchElementException with Stream
body: <p>I have the following <code>Stream</code>:</p>
  
  <pre><code>Stream&lt;T&gt; stream = stream();
  
  T result = stream.filter(t -&gt; {
      double x = getX(t);
      double y = getY(t);
      return (x == tx &amp;&amp; y == ty);
  }).findFirst().get();
  
  return result;
  </code></pre>
  
  <p>However, there is not always a result which gives me the following error:</p>
  
  <blockquote>
    <p>NoSuchElementException: No value present</p>
  </blockquote>
  
  <p>So how can I return a <code>null</code> if there is no value present?</p>