Validate the input to `RFC3986EscapedStringWithEncoding()` 

So that it does not return nil.

fixes #5