code: @Nullable
    public static Type getType(@Nullable Tree tree) {
      return tree instanceof JCTree ? ((JCTree) tree).type : null;
    }
docs: Returns the {@code Type} of the given tree, or {@code null} if the type could not be
  determined.