basicTypeToBool function
parse any bool or parse as null num
Implementation
bool? basicTypeToBool(Object? value) {
/// But most likely to happen first
if (value is bool) {
return value;
} else if (value == null) {
return null;
} else if (value is num) {
return value != 0;
} else if (value is String) {
return _parseBool(value);
} else {
return _parseBool(value.toString());
}
}