Check Content-Type on output.
Avoid setting nil locations.