Simplified Content-Type checking code