Remove redundant loose equality checks against undefined.