public static boolean isTypeInLibrary(@Nullable PsiType type) {
    return classIsInLibrary(PsiUtil.resolveClassInClassTypeOnly(type));
  }
public static boolean isTypeInLibrary(@Nullable PsiType type)