docs: @Nullable
    public static MethodSymbol getSymbol(MethodInvocationTree tree) {
      Symbol sym = ASTHelpers.getSymbol(tree.getMethodSelect());
      if (!(sym instanceof MethodSymbol)) {
        // Defensive. Would only occur if there are errors in the AST.
        return null;
      }
      return (MethodSymbol) sym;
    }