Check if Content-Type header exists before checking its value - Fix #410