diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Formatters/MediaTypeCollection.cs b/src/Microsoft.AspNetCore.Mvc.Core/Formatters/MediaTypeCollection.cs index 065bbde7cd..5fa822c59a 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Formatters/MediaTypeCollection.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/Formatters/MediaTypeCollection.cs @@ -30,7 +30,7 @@ public void Add(MediaTypeHeaderValue item) throw new ArgumentNullException(nameof(item)); } - Add(item?.ToString()); + Add(item.ToString()); } ///