awaitSingleOrNull

suspend fun <T> Mono<T>.awaitSingleOrNull(): T?(source)

Awaits the single value from the given Mono without blocking the thread and returns the resulting value, or, if this publisher has produced an error, throws the corresponding exception. If the Mono completed without a value, null is returned.

This suspending function is cancellable. If the Job of the current coroutine is cancelled while the suspending function is waiting, this function immediately cancels its Subscription and resumes with CancellationException.