static Name castFrom(Object value) { if (value is Name) { return value; } if (value is String) { return Name(value); } throw ArgumentError('Unknown Name value: $value'); }