Device presence value read help!

What is the syntax for reading a device presence state? I know how to do a switch but I can't seem to figure out how to do it for a presence - This doesn't work:

if (device.currentState("presence") == "present")  { 
       departed()
    } else {
       arrived()
    }
}

Got it.

def toggle() {
    if (device.currentState("presence")?.value != "present") { 
       arrived()
    } else {
       departed()
    }
}