Improved validation in content-type check methods