Use flatMap in combination with asOption.