Check if a string has length
static bool hasLength(String? str) { return str != null && str.isNotEmpty; }