Added validation of querystring