diff --git a/src/Polly.Core/ResilienceProperties.cs b/src/Polly.Core/ResilienceProperties.cs index e8cd9cfbb62..6866be4a190 100644 --- a/src/Polly.Core/ResilienceProperties.cs +++ b/src/Polly.Core/ResilienceProperties.cs @@ -27,7 +27,7 @@ public bool TryGetValue(ResiliencePropertyKey key, [MaybeNullWhe value = typedValue; return true; } - else if (val == null) + else if (val is null) { value = default!; return true;