check that writeHead is defined on the res object.
0.3.5