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