work towards unified validity-checking