Check that Content-Type header exists before running a regexp on it

I ran into a situation where a server was not returning a Content-Type, and the match check was failing. It failed with an exception, which kept my success function from calling.