void (@Nullable PsiTypeElement typeElement, @NotNull @Nls String message) { if (!reportInstanceOf) return; if (!typeIsConcreteClass(typeElement)) return; PsiMethod method = PsiTreeUtil.getParentOfType(typeElement, PsiMethod.class, true, PsiClass.class, PsiLambdaExpression.class); if (MethodUtils.isEquals(method)) return; registerError(typeElement, message); }