boolean () { if (myValueReference == null) return false; PsiVariable var = extractDeclaration(); // has variable, but it used only in condition return var == null || ReferencesSearch.search(var).findAll().size() != 1; }