Updated to look for undefined not null responses
Moved to better test method and fixed broken promises