diff --git a/src/Controls/src/Core/Shapes/PointCollectionConverter.cs b/src/Controls/src/Core/Shapes/PointCollectionConverter.cs index 689c7b5d90d9..e670bacd1f42 100644 --- a/src/Controls/src/Core/Shapes/PointCollectionConverter.cs +++ b/src/Controls/src/Core/Shapes/PointCollectionConverter.cs @@ -23,13 +23,9 @@ public override bool CanConvertTo(ITypeDescriptorContext? context, Type? destina return (PointCollection)pointArray; } - var strValue = value?.ToString(); - if (string.IsNullOrWhiteSpace(strValue)) - { - throw new InvalidOperationException("Cannot convert null or empty string into PointCollection."); - } + var strValue = value?.ToString() ?? string.Empty; - string[] points = strValue!.Split(new char[] { ' ', ',' }); + string[] points = strValue.Split(new char[] { ' ', ',' }); var pointCollection = new PointCollection(); double x = 0; bool hasX = false;