code: public static void checkNode(Node node, Node.Type... validTypes) {
  		for (Node.Type type : validTypes) {
  			if (node.getNodeType() == type) {
  				return;
  			}
  		}
  		StringJoiner sj = new StringJoiner(", ");
  		for (Node.Type type : validTypes) {
  			sj.add(type.toString());
  		}
  		String nodeName = node.getNodeType().name();
  		if (node instanceof NameBearer) {
  			nodeName = ((NameBearer) node).getName();
  		}
  		throw new FuzzerException(nodeName + ": invalid, must be one of " + sj.toString());
  	}
docs: Check a node for validity.
  <p>
  @param node       the node
  @param validTypes expected types