I would like to validate parameters used for record initialization and thro, if validation fails. For regular class I could use constructor for that, but how should I do it