encodeUrlIfNot

Encode Url if not already encoded, by checking decoding, if we get illegal argument exception.