errOrNull property

E? get errOrNull

Returns the error if present, null otherwise

Use with caution - prefer when for type-safe handling

Implementation

E? get errOrNull => isErr ? (this as Err<T, E>).error : null;