bool toBool({bool caseSensitive = false}) { if (this == null) return false; final val = this!.trim(); if (caseSensitive) return val == 'true'; return val.toLowerCase() == 'true'; }