Fix 500 due to calling indexOf on undefined this.response.type