cleanup comparisons to undefined