title: When should I compare an optional value to nil?
body: <p>Quite often, you need to write code such as the following:</p>
  
  <pre><code>if someOptional != nil {
      // do something with the unwrapped someOptional e.g.       
      someFunction(someOptional!)
  }
  </code></pre>
  
  <p>This seems a bit verbose, and also I hear that using the <code>!</code> force unwrap operator can be unsafe and best avoided.  Is there a better way to handle this?</p>