Adding basic parameter validation from the validator library at https://github.com/chriso/validator.js. This method is fairly clean but does not allow for the use of optional params in the validation functions (isDivisibleBy() is not useable, for example) but this feels like a good balance.