title: Binary operator '!=' cannot be applied to operands of type "UIImage"
body: <p>I'm trying to check if there is an image by using the below if statement:</p>
  
  <pre><code>var profileImage = UIImage()
  
  
   @IBAction func submitAction(_ sender: Any) {
  
  
      if profileImage != 0 &amp;&amp; nameTextField.text != nil {
  
  
      let storageRef = FIRStorage.storage().reference()
      let databaseRef = FIRDatabase.database().reference()
  
      let uid = FIRAuth.auth()?.currentUser?.uid
  
      let profileImageData = UIImageJPEGRepresentation(self.profileImage, 0.4)
  
      let profileImageRef = storageRef.child("ProfileImages/\(uid)/profileImage.jpg")
      profileImageRef.put(profileImageData!, metadata: nil) {
          metadata, error in
  
          if error != nil{
  
              print("error!")
  
          }
          else{
  
              let downloadURL = metadata?.downloadURL()
              let username = self.nameTextField.text
              let user : [NSObject : AnyObject] = ["uid" as NSObject : uid! as AnyObject, "username" as NSObject : username! as AnyObject, "profileImageURL" as NSObject : downloadURL! as AnyObject]
  
  
  
              let childUpdates = ["Users/\(uid)/" : user]
              databaseRef.updateChildValues(childUpdates)
  
          }
          }
          }
  
      }
  </code></pre>
  
  <p>However it returns error:</p>
  
  <p>'Binary operator '!=' cannot be applied to operands of type "UIImage'</p>
  
  <p>I've also tried replacing 0 with nil but this wouldn't work with a UIImage.</p>