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 */
For Kotlin what i normally use is
if (object?.booleanProperty ==true) { //do stuff }
this would only work when the property is true and the object is not null. For the reverse:
if (!object?booleanProperty !=true) { //do Stuff }