title: NoSuchElementException when looking for a match in a List
body: <p>The following old-fashioned, simple code works fine (traverses a list of strings, and returns true, as there should be a match): </p>
  
  <pre><code>public boolean isMatched() {
    List&lt;String&gt; stringList = Arrays.asList("str1", "str2", "str3");
    String matchString = "str1";
  
    for (String str : stringList) {
      if (StringUtils.equals(str, matchString)) {
          return true;
      }
    }
  
    return false;
  }
  </code></pre>
  
  <p>Now, I want to do the same thing, but use Java 8 instead. I have this so far: </p>
  
  <pre><code>public boolean isMatched() {
    List&lt;String&gt; stringList = Arrays.asList("str1", "str2", "str3");
    String matchString = "str1";
    return (stringList.stream().filter(str -&gt; StringUtils.equals(matchString, str)).findFirst().get() != null);
  }
  </code></pre>
  
  <p>With this second method, I'm getting the following error: </p>
  
  <pre class="lang-none prettyprint-override"><code>java.util.NoSuchElementException: No value present [junit] at java.util.Optional.get(Optional.java:135)
  </code></pre>
  
  <p>Why am I getting this error and what should I do to solve it?</p>