Validate the input to `RFC3986EscapedStringWithEncoding()` so that it does not return nil.

fixes #5
Merge pull request #6 from tapi/Validate-RFC3986EscapedStringWithEncoding-Inputcd

Validate the input to `RFC3986EscapedStringWithEncoding()`