Add validation for incoming data