title: Handling fatal error: unexpectedly found nil while unwrapping an Optional value when creating a date object from a date string
body: <p>I got a strange error when creating a date object.</p>
  
  <p>The error is "fatal error: unexpectedly found nil while unwrapping an Optional value"</p>
  
  <p>Simplified code that shows the issue is</p>
  
  <pre><code>let dateFormatter = NSDateFormatter() ;
  dateFormatter.dateFormat = "yyyy-MM-dd hh:mm:ss" ;
  
  let startDateText:String = (data["startDate"] as AnyObject? as? String) ?? "";      
  
  print( startDateText ) ;
  let startDate:NSDate! = dateFormatter.dateFromString(startDateText) ;
  print( startDate ) ;
  </code></pre>
  
  <p>The data object when printed is</p>
  
  <pre><code>{
      calendar = archived;
      endDate = "2016-01-25 15:15:00";
      notes = "notes and something";
      startDate = "2016-01-25 14:00:00";
      title = "First event from the command line";
  }
  </code></pre>
  
  <p>Archived is a calendar object from EKEventStore</p>
  
  <p>The strange part is the code works on another device.</p>
  
  <p>Any ideas on how to handle and solve "fatal error: unexpectedly found nil while unwrapping an Optional value"?</p>