private static @Nullable Set<DfaVariableValue> getNotNullValues(@NotNull DfaValueFactory factory, @Nullable PsiExpression expression) {
    if (expression == null) return null;
    ControlFlow flow = ControlFlowAnalyzer.buildFlow(expression, factory, true);
    if (flow == null) return null;
    var listener = new DfaListener() {
      final Map<DfaVariableValue, Boolean> result = new HashMap<>();

      @Override
      public void onCondition(@NotNull UnsatisfiedConditionProblem problem,
                              @NotNull DfaValue value,
                              @NotNull ThreeState failed,
                              @NotNull DfaMemoryState state) {
        if (problem instanceof NullabilityProblemKind.NullabilityProblem &&
            ((NullabilityProblemKind.NullabilityProblem<?>)problem).thrownException() != null &&
            value instanceof DfaVariableValue) {
          result.merge((DfaVariableValue)value, failed != ThreeState.NO, Boolean::logicalAnd);
        }
      }

      @Override
      public void beforePush(@NotNull DfaValue @NotNull [] args,
                             @NotNull DfaValue value,
                             @NotNull DfaAnchor anchor,
                             @NotNull DfaMemoryState state) {
        if (anchor instanceof JavaExpressionAnchor && ((JavaExpressionAnchor)anchor).getExpression() == expression) {
          Set<DfaVariableValue> vars = result.keySet();
          StreamEx.of(vars)
            .filter(v -> DfaNullability.fromDfType(state.getDfType(v)) != DfaNullability.NOT_NULL)
            .toSetAndThen(vars::removeAll);
        }

      }
    };
    var interpreter = new StandardDataFlowInterpreter(flow, listener);
    if (interpreter.interpret(new JvmDfaMemoryStateImpl(factory)) != RunnerResult.OK) return null;
    return StreamEx.ofKeys(listener.result, x -> x).toSet();
  }
private static @Nullable Set<DfaVariableValue> getNotNullValues(@NotNull DfaValueFactory factory, @Nullable PsiExpression expression)