boolean ( PsiExpression lhs) { if (!(lhs instanceof PsiReferenceExpression referenceExpression)) { return false; } final PsiElement element = referenceExpression.resolve(); if (!(element instanceof PsiVariable variable)) { return false; } if (ignoreAssignmentsToFields && variable instanceof PsiField) { return true; } return NullableNotNullManager.isNullable(variable); }