Add toOptional on case match