Unify/simplify type testing in "validate_*_list".