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