PsiElement (@Nullable PsiReferenceExpression expression) { if (expression == null) return null; PsiIdentifier[] identifiers = PsiTreeUtil.getChildrenOfType(expression, PsiIdentifier.class); if (identifiers == null || identifiers.length != 1) { return null; } return identifiers[0]; }