title: Cannot convert value of type Int to expected argument type Bool
body: <p>I'm trying to filter Firebase query results with three conditions:</p>
  
  <pre><code>let posts = snapshot.childSnapshots.map {
                      Post(snapshot: $0)
                      }.reversed().filter {
                          post?.isGlobal == dataFilter &amp;&amp; (self.dependents.contains($0.postedBy) || self.currentUser?.uid == $0.postedBy)
                  }
  </code></pre>
  
  <p>The first condition <code>(post.isglobal == datafilter)</code> must be met. Then, I want to filter posts further when either one of the remaining two conditions are met. </p>
  
  <p>The above code returns an error: <code>Binary operator == cannot be applied to operands of type NSNumber? and Int</code></p>
  
  <p>Any help would be greatly appreciated.
  Thanks!</p>
  
  <p>EDIT: the <code>dataFilter</code> variable is defined as a global variable within the viewcontroller class: </p>
  
  <p><code>var dataFilter = 0</code></p>