Moved Content-Type validation to beginning.