It's also possible to construct objects from query string parameters. I think the easiest way to solve this is calling .toString() on all the parameters you're attempting to use before you use them in the variable declaration block above