Optional
This type represents T as not only potentially nullable data, but also as a data which can not be presented. This type will be useful in cases when T is nullable and null as valuable data too in time of data absence should be presented by some third type.
Let's imagine, you have nullable name in some database. In case when name is not nullable everything is clear - null will represent absence of row in the database. In case when name is nullable null will be a little bit dual-meaning, cause this null will say nothing about availability of the row (of course, it is exaggerated example)
See also
Types
Extensions
data Or Null
Link copied to clipboard
Returns Optional.data if Optional.dataPresented of this is true, or null otherwise