Checking string length with "if not"

instead of comparison with "" per feedback from @alex.