Adding some data validation