Fix check for undefined (#4)