isBasicTypeOrNull function
True for null, num, String, bool
Implementation
bool isBasicTypeOrNull(dynamic value) {
if (value == null) {
return true;
} else if (value is num || value is String || value is bool) {
return true;
}
return false;
}