Particle.isClaimed() or Particle.isOrphan() in firmware

Is there a way (in firmware) to determine if a device is claimed?

We would like to be able to detect if the device is claimed and execute (setup) programming accordingly.