code: private static boolean isAcceptNode(Object nodeObj)
      {
          if (nodeObj != null)
          {
              Class nodeObjClass = nodeObj.getClass();
  
              if (nodeObjClass.equals(MDAGNode.class))
                  return ((MDAGNode) nodeObj).isAcceptNode();
              else if (nodeObjClass.equals(SimpleMDAGNode.class))
                  return ((SimpleMDAGNode) nodeObj).isAcceptNode();
  
          }
  
          throw new IllegalArgumentException("Argument is not an MDAGNode or SimpleMDAGNode");
      }
docs: Determines if a child node object is accepting.
  
  @param nodeObj an Object
  @return if {@code nodeObj} is either an MDAGNode or a SimplifiedMDAGNode,
  true if the node is accepting, false otherwise
  throws IllegalArgumentException      if {@code nodeObj} is not an MDAGNode or SimplifiedMDAGNode