boolean (@NotNull PsiElement element) { if (element instanceof PsiVariable) { return PsiTypes.booleanType().equals(((PsiVariable) element).getType()); } else if (element instanceof PsiMethod) { return PsiTypes.booleanType().equals(((PsiMethod) element).getReturnType()); } return false; }