diff --git a/src/Microsoft.AspNet.Mvc.Core/FormatterMappings.cs b/src/Microsoft.AspNet.Mvc.Core/FormatterMappings.cs index ab184bd690..276f7ac81c 100644 --- a/src/Microsoft.AspNet.Mvc.Core/FormatterMappings.cs +++ b/src/Microsoft.AspNet.Mvc.Core/FormatterMappings.cs @@ -66,7 +66,7 @@ namespace Microsoft.AspNet.Mvc private string RemovePeriodIfPresent(string format) { - if (format == "") + if (string.IsNullOrEmpty(format)) { throw new ArgumentException(Resources.ArgumentCannotBeNullOrEmpty, nameof(format)); }