clean up check_validity_against_schema