boolean (final PsiInstanceOfExpression instanceOfExpression) { PsiElement element = instanceOfExpression.getParent(); while (element instanceof PsiParenthesizedExpression) { element = element.getParent(); } return element instanceof PsiPrefixExpression && ((PsiPrefixExpression)element).getOperationTokenType() == JavaTokenType.EXCL; }