if let cost = Double(textField.text!) { print("The item is valued at: (cost)") } else { print("Not a valid number: (textField.text!)") }