Input data validation