I know this isn't exactly your change, but could you possibly change the comparison to empty string to a call to `.empty()`?