Implemented basic model validation