Fix issue9301 - handle unquote({}) kind of case.
diff --git a/Lib/urllib/parse.py b/Lib/urllib/parse.py
index 691c004..a9fa26a 100644
--- a/Lib/urllib/parse.py
+++ b/Lib/urllib/parse.py
@@ -313,9 +313,7 @@
     """unquote_to_bytes('abc%20def') -> b'abc def'."""
     # Note: strings are encoded as UTF-8. This is only an issue if it contains
     # unescaped non-ASCII characters, which URIs should not.
-    if not string:
-        if string is None:
-            raise TypeError('None object is invalid for unquote_to_bytes()')
+    if string in (b'', ''):
         return b''
     if isinstance(string, str):
         string = string.encode('utf-8')
@@ -340,9 +338,7 @@
 
     unquote('abc%20def') -> 'abc def'.
     """
-    if not string:
-        if string is None:
-            raise TypeError('None object is invalid for unquote() function.')
+    if string in (b'', ''):
         return string
     res = string.split('%')
     if len(res) == 1: