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 */
In case if you want to perform operations alike contain on a String you could use equality check like below -
contain
String
if (url?.contains("xxx") == true){ return false; }