public override object ConvertFrom (ITypeDescriptorContext context, CultureInfo culture, object value)
{
// culture?
- if (value == null) {
- throw new NotSupportedException ("MinimizableAttributeTypeConverter cannot convert from (null)");
- }
-
- Type t = value.GetType ();
- if (t == typeof (string))
- return ((string)value) != String.Empty;
-
- if (t == typeof (bool))
- return value;
+ if (value != null) {
+ Type t = value.GetType ();
+ if (t == typeof (string))
+ return ((string)value) != String.Empty;
+ if (t == typeof (bool))
+ return value;
+ }
+
return base.ConvertFrom (context, culture, value);
}