Initial data validation code.