Object (PsiExpression expression) { if (expression.getTextLength() > MAX_EXPRESSION_LENGTH) return null; if (expression.getType() == null) return null; Object value = computeValue(expression); if (value == null) return null; final PsiExpression parent = getParentExpression(expression); if (parent != null && computeValue(parent) != null) return null; return value; }