title: Function throws AND returns optional.. possible to conditionally unwrap in one line?
body: <p>I am using an SQLite library in which queries return optional values as well as can throw errors. I would like to conditionally unwrap the value, or receive nil if it returns an error. I'm not totally sure how to word this, this code will explain, this is what it looks like:</p>
  
  <pre><code>func getSomething() throws -&gt; Value? {
      //example function from library, returns optional or throws errors
  }
  
  
  func myFunctionToGetSpecificDate() -&gt; Date? {
      if let specificValue = db!.getSomething() {
           let returnedValue = specificValue!
           // it says I need to force unwrap specificValue, 
           // shouldn't it be unwrapped already?
  
           let specificDate = Date.init(timeIntervalSinceReferenceDate: TimeInterval(returnedValue))
           return time
      } else {
           return nil
      }
  
  }
  </code></pre>
  
  <p>Is there a way to avoid having to force unwrap there? Prior to updating to Swift3, I wasn't forced to force unwrap here.</p>
  
  <p>The following is the actual code. Just trying to get the latest timestamp from all entries:</p>
  
  <pre><code>func getLastDateWithData() -&gt; Date? {
      if let max = try? db!.scalar(eventTable.select(timestamp.max)){
  
          let time = Date.init(timeIntervalSinceReferenceDate: TimeInterval(max!))
  
          // will max ever be nil here? I don't want to force unwrap!
          return time
  
      } else {
          return nil
      }
  }
  </code></pre>