title: Mixing getOrElse with forall
body: <p>I've defined a Option:</p>
  
  <pre><code>val names : Option[Seq[String]] = Option(Seq("Bob", "Alice", "Mike"))
  names.get.forall(m =&gt; Seq("Bob").contains(m))
  </code></pre>
  
  <blockquote>
    <p>Boolean = false</p>
  </blockquote>
  
  <p>But, I would like to replace this with a <strong>getOrElse</strong> to avoid NPE. The following didn't work.</p>
  
  <pre><code>names.getOrElse.forall(m =&gt; Seq("Bob").contains(m))
  </code></pre>
  
  <blockquote>
    <p>error: value forall is not a member of Object</p>
  </blockquote>