Fixed getAs[Type]("key") to stop invalid casts to Some(value) (SCALA-136)