title: Binary operator '==' cannot be applied to operands of type 'NSObject' and 'String'
body: <p>I am trying to search users on a UITableView, through a UISearchBar. The thing is that an error keeps appearing when I try to. </p>
  
  <p>Here's my code:</p>
  
  <pre><code> var isSearching = false
   func searchBar(_ searchBar: UISearchBar, textDidChange searchText:String) {
       if searchBar.text == nil || searchBar.text == "" {
          isSearching = false
          view.endEditing(true)
          searchTableView.reloadData()
      } else {
          isSearching = true
          filteredUsers = users.filter({$0 == searchBar.text!})  // error appears here
  
      }
  
      searchTableView.reloadData()
  }
  </code></pre>
  
  <p>I am trying to search for the users in my app, through Firebase fetch. I've already fetched the users onto a UITableView, the thing is I cant search for a specific one. Please help! I've tried everything.</p>