Check for headers

In some of the use that I was doing with WebMock, sometimes headers were not present, so this kept it from crashing.