Validation for constructors