docs: @Nullable
    private static Object getInstance(Tree tree, VisitorState state) {
      Object value = ASTHelpers.constValue(tree);
      if (value != null) {
        return value;
      }
      Type type = ASTHelpers.getType(tree);
      return getInstance(type, state);
    }