added some validation on creation of items