Fix brittle empty string comparisons