Added validation of the object