If I have a nullable Boolean b, I can do the following comparison in Java:
Boolean b
Boolean b = ...; if (b != null && b) { /* Do something */
It's pretty easy to add an extension function if that helps you.
fun Boolean?.orDefault(default: Boolean = false): Boolean { if (this == null) return default return this } var x: Boolean? = null if(x.orDefault()) { .. }