getOrNull

fun getOrNull(): A?(source)

Retrieves the encapsulated value if this instance is of type Success, or null otherwise.

Return

the encapsulated value of type A if this instance is Success, or null if this instance is not Success.