private static boolean isCompatible(@NotNull PsiType expectedType, @Nullable PsiType actualType) {
    return actualType != null && (expectedType.isAssignableFrom(actualType) || actualType.isAssignableFrom(expectedType));
  }
private static boolean isCompatible(@NotNull PsiType expectedType, @Nullable PsiType actualType)