How to use the Option type for safe nullable values