Added Validator to throw errors on invalid input