failureOrNull

abstract fun failureOrNull(): Failure?

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