Fixes issue when API response is null

When the result === null, an error gets thrown in the switch statement since null has no property 'status.'