if (!response || !response.data || !response.data.success || response.data.success == false ) { //process stuff }
Not talking about the '===' warning, here