Use flatMap for dealing with Options.