code: public static void ensureXPathNotEmpty(NodeList nodeList, String expression) {
      if (nodeList == null || nodeList.getLength() == 0) {
        throw LOG.unableToFindXPathExpression(expression);
      }
    }
docs: Ensure that the nodeList is either null or empty.
  
  @param nodeList the nodeList to ensure to be either null or empty
  @param expression the expression was used to fine the nodeList
  @throws SpinXPathException if the nodeList is either null or empty