transform: add ->valid() function