Adding model validation