extension StringNullableExtensions on String? { bool get toBoolean { if (this == null) return false; return this!.toLowerCase() == 'true'; } bool get isNullOrEmpty { if (this == null) return true; if (this == '') return true; return false; } bool get isNotNullAndEmpty { if (this == null) return false; if (this == '') return false; return true; } } extension StringExtensions on String { bool get toBoolean { return toLowerCase() == 'true'; } } extension StringExtension on String? {}