diff --git a/lib/bot.js b/lib/bot.js
index <HASH>..<HASH> 100644
--- a/lib/bot.js
+++ b/lib/bot.js
@@ -154,7 +154,7 @@ module.exports = ( function () {
 
 			const self = this,
 				logInCallback = function ( err, data ) {
-					if (data == null) {
+					if (data === null || typeof data === 'undefined') {
 						self.error('Logging in failed: no data received');
 						callback(err || new Error(`Logging in failed: no data received`));
 					} else if ( !err && typeof data.lgusername !== 'undefined' ) {
Changed to long-form null/undefined check