title: Initializer for conditional binding must have Optional type, not 'NSManagedObjectContext
body: <p>I get this error message: "Initializer for conditional binding must have Optional type, not 'NSManagedObjectContext ".</p>
  
  <p>I am not sure how to fix this error. The error is with the "if let" I think.</p>
  
  <pre><code>  if  let managedObjectContext = (UIApplication.sharedApplication().delegate as! AppDelegate).managedObjectContext  {
          restaurant = NSEntityDescription.insertNewObjectForEntityForName("Restaurant",
              inManagedObjectContext: managedObjectContext) as! Restaurant
          restaurant.name = nameTextField.text
          restaurant.type = typeTextField.text
          restaurant.location = locationTextField.text
          restaurant.image = UIImagePNGRepresentation(imageView.image!)
          restaurant.isVisited = isVisited
          //restaurant.isVisited = NSNumber.convertFromBooleanLiteral(isVisited)
  
          var e: NSError?
          if managedObjectContext.save() != true {
              print("insert error: \(e!.localizedDescription)")
              return
          }
      }
  </code></pre>