Fixed 'indexOf of undefined' error

Got this error lately.
Some requests wouldn't have any headers(.accept) property, for some reason.
Tests still pass