``` if (thing != null) { dest.writeInt(1) dest...
# android
j
Copy code
if (thing != null) {
  dest.writeInt(1)
  dest.writeInt(thing)
} else {
  dest.writeInt(0)
}
Copy code
val thing = dest.readInt() == 0 ? null : dest.readInt()