Bad undefined compare

Check values against data type undefined, rather than string.