/// <summary>
        /// Adds a query string parameter. Calls <see cref="object.ToString"/> on the <paramref name="value"/>.
        /// </summary>
        /// <param name="builder">The <see cref="FluentUriBuilder"/>.</param>
        /// <param name="name">The name of the parameter.</param>
        /// <param name="value">The value of the parameter.</param>
        /// <param name="encode">True to UrlEncode the value, false otherwise.</param>
        /// <returns>A new instance of <see cref="FluentUriBuilder"/> with the added parameter.</returns>
        public static FluentUriBuilder WithParam(this FluentUriBuilder builder, string name, object value, bool encode = true)
        {
            if (builder == null)
            {
                throw new ArgumentNullException(nameof(builder));
            }

            if (value == null)
            {
                return(builder);
            }

            return(builder.WithParam(name, value.ToString(), encode));
        }
        /// <summary>
        /// Conditionally adds a query string parameter.
        /// </summary>
        /// <param name="builder">The <see cref="FluentUriBuilder"/>.</param>
        /// <param name="name">The name of the parameter.</param>
        /// <param name="value">The value of the parameter.</param>
        /// <param name="condition">The condition to check. The param will only be added if true.</param>
        /// <param name="encode">True to UrlEncode the value, false otherwise.</param>
        /// <returns>A new instance of <see cref="FluentUriBuilder"/> with the added parameter.</returns>
        public static FluentUriBuilder WithParamIf(this FluentUriBuilder builder, string name, string value, bool condition, bool encode = true)
        {
            if (builder == null)
            {
                throw new ArgumentNullException(nameof(builder));
            }

            if (!condition)
            {
                return(builder);
            }

            return(builder.WithParam(name, value, encode));
        }