title: Why cant I unwrap this optional value using Swift?
body: <p>I am trying to get the value for first record which is "2018-05-04 09:00:00 +0000". When I print out `firstRecord', I get an optional value in the terminal:</p>
  
  <blockquote>
    <p>optional(2018-05-04 09:00:00 +0000).</p>
  </blockquote>
  
  <p>Then I tried to unwrap it like so: </p>
  
  <pre><code>if dailyArray.count == 0 {
      print("no record was found")
  }else{
      guard let firstRecord : String = dailyArray[0]["startTime"] as! String else {return}
      let firstRecordArray = firstRecord.components(separatedBy: " ")
      print("data exist \(firstRecordArray[0])")
  }
  </code></pre>
  
  <p>And now Xcode is giving me an error saying that you are trying to unwrap a none optional value.</p>
  
  <p>Any idea where am I making a mistake? </p>