Returns None if opt holds a value for which isEmpty returns true, otherwise passes opt unchanged.
true
opt('x').noneIfEmpty() // Some('x')opt('').noneIfEmpty() // Noneopt([]).noneIfEmpty() // Noneopt({}).noneIfEmpty() // None
Returns None if opt holds a value for which isEmpty returns
true
, otherwise passes opt unchanged.