Add validation primitives

Part 2 in a series of changes towards data validation.