Fixed bug

Use scala.Some instead of scala.Option because value might be null