code: public boolean nodeExists(String path) throws ZooKeeperException {
          try {
              Stat stat = curatorFramework.checkExists().forPath(path);
              return stat != null;
          } catch (Exception e) {
              if (e instanceof ZooKeeperException) {
                  throw (ZooKeeperException) e;
              } else {
                  throw new ZooKeeperException(e);
              }
          }
      }
docs: Checks if a path exists.
  
  @param path
  @return
  @throws ZooKeeperException