Optional<Boolean> (@Nullable PyType expected, @Nullable PyType actual, @NotNull MatchContext context) { final Optional<Boolean> result = RecursionManager.doPreventingRecursion( Pair.create(expected, actual), false, () -> matchImpl(expected, actual, context) ); return result == null ? Optional.of(true) : result; }