code: function (url, paramName, paramValue)
      {
        // if the specified url is valid
        var urlAsObject = Url.parse(url);
        if (urlAsObject)
        {
          // if the url already has query parameters, use '&' as the separator
          // when appending the additional query parameter, otherwise use '?'
          url += (urlAsObject.search ? '&' : '?') + paramName + '=' + paramValue;
        }
  
        return url;
      }
docs: Appends a query parameter to a url. If an invalid url is specified, an
  exception is thrown.
  
  @param {String} url
  @param {String} paramName the name of the query parameter.
  @param {String} paramValue the value of the query parameter.
  
  @returns {String}