title: How do I use Scala Hashmaps and Options together correctly?
body: <p>My code snippets are below</p>
  
  <pre><code>import scala.collection.mutable.HashMap
  
  val crossingMap = new HashMap[String, Option[Long]]
  val crossingData: String = ...
  val time: Long = crossingMap.get(crossingData).getOrElse(0)
  </code></pre>
  
  <p>I get the following compile error</p>
  
  <pre><code>error: type mismatch;
  found   : Any
  required: Long
  val time: Long = crossingMap.get(crossingData).getOrElse(0)
  </code></pre>