getOrNull

fun <T> UiState<T>.getOrNull(): T?

Returns the encapsulated data if this state is UiState.Success, or null otherwise.