assertNotNull

Common
JVM
JS
Native
1.0
fun <T : Any> assertNotNull(
    actual: T?,
    message: String? = null
): T

Asserts that the actual value is not null, with an optional message.

Common
JVM
JS
Native
1.0
fun <T : Any, R> assertNotNull(
    actual: T?,
    message: String? = null,
    block: (T) -> R
): Unit

Asserts that the actual value is not null, with an optional message and a function block to process the not-null value.