code: public Token getRoot(boolean safe) {
          Token root = getRoot();
  
          if (root == null && safe) {
              root = Token.NULL;
          }
  
          return root;
      }
docs: Returns the root of the node, the Token that indicates it's
  type.  Returns a Token.NULL if safe and the actual root is null.