Correct check for undefined variable
Correct check for undefined variable

The code was comparing the result of `typeof` with a variable named `undefined`. 

As typeof returns a string it should compare to `'undefined'`.
SweetFruit/Game,SweetFruit/Game,candy-chat/candy,SweetFruit/Game,candy-chat/candy,candy-chat/candy