Validation Changes for Query String

Adding basic validation for query string