Added validation for DataLayer class