How to verify if a typeless leaf exists

I have a typeless leaf defined.

  leaf pcp-map-default {
      when "../cos-classifier = 'pcp'";
      type empty;
      tailf:info "Enable default pcp map treatment (pcp 0 maps to cos 0, pcp 1 to cos 1 ..etc)";

In read_conf(), I am wondering how do I check in the code to see if it exists or not?

   int cdb_exists(int sock, const char *fmt, ...);

   Leafs in the data model may be optional, and presence containers and
   list entries may or may not exist. This function checks whether a node
   exists in CDB. Returns 0 for false, 1 for true and CONFD_ERR or
   CONFD_EOF for errors.