code: private void existsCheck(Dn dn) throws NoSuchNodeException, MissingParentException {
          try {
              if (!connection.exists(dn.getParent())) {
                  throw new MissingParentException(lastMatch(dn));
              } else if (!connection.exists(dn)) {
                  throw new NoSuchNodeException(dn);
              }
          } catch (LdapException e) {
              throw new LdapDaoException(e);
          }
      }
docs: Throws appropriate exceptions for connection.exists(dn).