Validation and object initialization