private static object Invert(object value) { if (value is bool) { return !((bool)value); } return false; }