moved content type validator predicate and helper function to cornice.util