isBasicTypeOrNull function

bool isBasicTypeOrNull(
  1. dynamic value
)

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;
}