errorOrNull

Returns the encapsulated ErrorPayload if this instance represents failure or null if it is success.

This function is a shorthand for fold(onSuccess = { null }, onFailure = { it }) (see fold).