Using Option.isDefined instead of !Option.isEmpty