add validations to KlassFactory
update docs