You at least want to use `!==` here, but you probably want `if (!user)` instead since `undefined !== null`, nor is `0` or `""` a valid user.