thanks to @chill117

we can't check undefined for undefined