adding object type validation