title: App crashing because of no values in the uiTextfield
body: <p>When I enter a value in the UiTextField and press add button the app works perfectly fine,but when I don't enter a value in the UiTextField, then press the add button the whole app crashes. can someone please help me and show me the light.Thank you in advance and good wishes for you and your family.</p>
  
  <p>This is my code</p>
  
  <pre><code>import UIKit
  
  class ViewController: UIViewController,UITextFieldDelegate {
  
      override func viewDidLoad() {
          super.viewDidLoad()
          // Do any additional setup after loading the view, typically from a nib.
  
          self.textFild.delegate = self
  
      }
  
      override func didReceiveMemoryWarning() {
          super.didReceiveMemoryWarning()
          // Dispose of any resources that can be recreated.
      }
      @IBOutlet var textFild: UITextField!
  
      @IBAction func ButtonAwesome(sender: AnyObject) {
  
  
  
          let value:Double = Double(textFild.text!)!
  
  
          let sum:Double = value - 1;
  
  
  
          let alert = UIAlertController(title: "km", message:  "\(sum)", preferredStyle: UIAlertControllerStyle.Alert)
          alert.addAction(UIAlertAction(title: "Exit", style: UIAlertActionStyle.Default, handler: nil))
          self.presentViewController(alert,animated: true, completion: nil)
  
  
  
      }
  
  
      func textField(textField: UITextField,shouldChangeCharactersInRange range: NSRange,replacementString stringer: String) -&gt; Bool
      {
  
          if (textField.text == "" &amp;&amp; (stringer == ".")) {
              return false;
          }
  
  
          let countdots = textField.text!.componentsSeparatedByString(".").count - 1
  
          if countdots &gt; 0 &amp;&amp; stringer == "."
          {
              return false
          }
  
  
          return true
      }
  
  
  
  
  }
  </code></pre>