String? validateNotEmpty(String? value, String type) { if (value != null && value.isEmpty) { return '${type.inCaps} must not be empty'; } else { return null; } }