diff --git a/src/Plugin.Iconize/Iconize.cs b/src/Plugin.Iconize/Iconize.cs index ac0afe1..e4cec35 100644 --- a/src/Plugin.Iconize/Iconize.cs +++ b/src/Plugin.Iconize/Iconize.cs @@ -125,13 +125,10 @@ public static IIconModule FindModuleOf(IIcon icon) /// The icon, or null if no icon matches the key public static IIcon FindIconForKey(String iconKey) { - if (iconKey is null) - throw new ArgumentNullException(nameof(iconKey)); - if (String.IsNullOrWhiteSpace(iconKey)) - throw new ArgumentException($"{nameof(iconKey)} cannot be empty", nameof(iconKey)); + return null; - return Modules?.FirstOrDefault(x => x.Keys.Contains(iconKey))?.GetIcon(iconKey) ?? throw new NullReferenceException($"No icon with the key: {iconKey}"); + return Modules?.FirstOrDefault(x => x.Keys.Contains(iconKey))?.GetIcon(iconKey); } } } \ No newline at end of file