Added model validation