Safely wraps a value that might be null or undefined in an Option. Creates Some if the value is defined, None otherwise.
The value to wrap (might be null/undefined)
Some(value) if value is defined, None otherwise
The type of the value
Safely wraps a value that might be null or undefined in an Option. Creates Some if the value is defined, None otherwise.
Param: value
The value to wrap (might be null/undefined)
Returns
Some(value) if value is defined, None otherwise
Type Param: T
The type of the value