Added validation on assignment