Prevent creation of Some(null) with Option.map function