bool propertyMatches(String key, Pattern pattern) { var val = propertyAsString(key); if (val == null) return false; return _matches(pattern, val); }