@Contract("null, _ -> null")
  @Nullable
  public static PsiVariable getVariableFromNullComparison(PsiExpression expression, boolean equals) {
    final PsiReferenceExpression referenceExpression = getReferenceExpressionFromNullComparison(expression, equals);
    final PsiElement target = referenceExpression != null ? referenceExpression.resolve() : null;
    return target instanceof PsiVariable ? (PsiVariable)target : null;
  }
@Contract("null, _ -> null")
  @Nullable
  public static PsiVariable getVariableFromNullComparison(PsiExpression expression, boolean equals)