I am making a simple app, and implementing the userInformation part. The user can edit his info, but I have trouble that if user doesn't put any info, it will crash when I try to retrieve data from an undefined column.
This is my code to retrieve the user data. If there is data to parse it won't crash, otherwise it will.
let nickName = PFUser.currentUser()?.objectForKey("nickName") as! String
So I am asking how can I handle retrieving undefined value before crash? (please write full code for me)
Is there a way I can check value before I retrieve it?
///like this
if (value in parse == "ABC") {
print("yes")
}