add borrowed ParamsValidate function from Chef