title: “Convert” Option[x] to x
body: <p>I working with play for Scala (2.1) and I need to convert an <code>Option[Long]</code> value to <code>Long</code>.</p>
  <p>I know how to do the opposite, I mean:</p>
  <pre class="lang-scala prettyprint-override"><code>def toOption[Long](value: Long): Option[Long] = if (value == null) None else Some(value)
  </code></pre>
  <p>But in my case, I have to pass a value of <code>Option[Long]</code> as a type into a method that takes <code>Long</code>.</p>