Kotlin Null Safety Assertion


Example

!! suffixes ignore nullability and returns a non-null version of that type. KotlinNullPointerException will be thrown if the object is a null.

val message: String? = null
println(message!!) //KotlinNullPointerException thrown, app crashes