Added some validation to schemas