nullify method

String? nullify()

Returns null if the string is empty

Implementation

String? nullify() => (this?.isEmpty ?? true) ? null : this;