normalizeTag static method
Normalizes a tag name. Returns null for empty string.
Implementation
static String? normalizeTag(String? tag) {
if (tag == null) return null;
tag = tag.toLowerCase().trim();
if (tag.isEmpty) return null;
return tag;
}