protect against undef string comparison