null check a string kotlin code example Example: null check in kotlin if(a != null) { //do something }