title: Why can't I use Options inside of a slick query
body: <p>In order to save me having to create so many methods, I tried passing in Option's into my method and then checking if the Option is defined, if so, then apply the filter.</p>
  
  <pre><code>def getUsers(locationId: Option[Int], companyId: Int, salary: Option[Int]): List[User] = {
    val query = for {
      u &lt;- users if u.companyId === companyId &amp;&amp; (locationId.isDefined &amp;&amp; u.locationId === locationId.get) &amp;&amp; (salary.isDefined &amp;&amp; u.salary &gt;= salary.get)
  
    }
    query.list()
  }
  </code></pre>
  
  <p>I am getting errors saying: </p>
  
  <pre><code>polymorphic expression cannot be instantiated to expected type;
  
  IntelliJ errors are expected Boolean actual Column[Boolean].
  </code></pre>
  
  <p>Is this type of clause just not possible in a slick query or I'm just doing it wrong?</p>