private static boolean typesAreEquivalent(@Nullable PsiType type1, @Nullable PsiType type2) {
    return Objects.equals(type1, type2);
  }
private static boolean typesAreEquivalent(@Nullable PsiType type1, @Nullable PsiType type2)