I have two issues:
let amount:String? = amountTF.text
amount?.characters.count <= 0
It\'s giving error
Another reason for the error is amount it should not be null
let am = Double(amount!)
with check contol
if amount != nil { let am = Double(amount!) }