I know there are tons of stack overflow pages out there that explain how to do this but everytime I take the code from here and put it in i get the same error and that error
The text property is an optional. So it can contains a String or nil.
text
String
nil
If you want to treat nil as an empty String then just write
let isEmpty = (textField.text ?? "").isEmpty