title: Unary operator '!' cannot be applied to an operand of type '()'
body: <blockquote>
    <p>Unary operator '!' cannot be applied to an operand of type '()'</p>
  </blockquote>
  
  <p>Getting this error on the Swift 2 migration.</p>
  
  <pre><code>func saveContext() {
  
      if let foregroundMO = VPDataManager.sharedInstance.persistentStack.managedObjectContext
      {
          var error:NSError? = nil;
  
          let managedObjectContext: NSManagedObjectContext = foregroundMO
          managedObjectContext.mergePolicy = NSOverwriteMergePolicy
  
          if (managedObjectContext.hasChanges) &amp;&amp; !(managedObjectContext.save())
          {
              VPAnalytics.leaveBreadcrumb("AppDelegate saveContext critical error: \(error), \(error?.userInfo)")
              logError("Unresolved issue: \(error), \(error?.userInfo)")
              abort()
          }
      }
  }
  </code></pre>
  
  <p>The error happens on <code>if (managedObjectContext.hasChanges</code>...</p>