If the provided String is null do something.
String
null
String foo = '' foo.ifEmpty(()=>print('String is null'));
String ifNull(Function act) { if (this != null) { return this!; } return act(); }