code: private static void checkStringExprNode(@Nullable Node node) {
      if (node == null) {
        throw new IllegalArgumentException("Expected a string; found: null");
      }
      switch (node.getToken()) {
        case STRING:
        case TEMPLATELIT:
          break;
        case ADD:
          Node c = node.getFirstChild();
          checkStringExprNode(c);
          checkStringExprNode(c.getNext());
          break;
        default:
          throw new IllegalArgumentException("Expected a string; found: " + node.getToken());
      }
    }
docs: Checks that a node is a valid string expression (either a string literal
  or a concatenation of string literals).
  
  @throws IllegalArgumentException if the node is null or the wrong type