[fix] Allow a string to be passed in

The URL interface in browsers also support this