Move value validation into respective classes.