title: How to check if core data is empty
body: <p>How do I check if core data is empty using Swift. I tried this method:</p>
  
  <pre><code>var people = [NSManagedObject]()
  
  if people == nil {
  
  }
  </code></pre>
  
  <p>but this results in this error:  </p>
  
  <blockquote>
    <p>“binary operator '==' cannot be applied to operands of type [NSManagedObject] and nil”</p>
  </blockquote>