Remove debug code `valid`