title: Swift 3: Check for item in an array
body: <p>I would like to check if an item exists in an array:</p>
  
  <pre><code> protocol Item {
          var name: String! {get set}
          var value: Int! {get set}
      }
  
  class UserList {
      var items: [Item]!
  
      func checkItem(item: Item) -&gt; Bool{
          if items.contains(where: {$0 === item}) {  // Error
              return true
          }
          return false
      }
  }
  </code></pre>
  
  <p>I get this error:</p>
  
  <pre><code>Binary operator '===' cannot be applied to two 'Item' operands
  </code></pre>