Only add query to uri if query_string is not blank