<!--- Verify first that your issue is not already reported on GitHub -->
<!--- Also test if the latest release and devel branch are affected too -->
<!--- Complete *all* sections as described, this form is processed automatically -->

##### SUMMARY
regardin the comment from https://github.com/ansible/ansible/pull/65098
```
{"attempts": 3, "changed": false, "module_stderr": "Traceback (most recent call last):\n File \"<stdin>\", line 102, in <module>\n File \"<stdin>\", line 94, in _ansiballz_main\n File \"<stdin>\", line 40, in invoke_module\n File \"/usr/lib/python3.6/runpy.py\", line 205, in run_module\n return _run_module_code(code, init_globals, run_name, mod_spec)\n File \"/usr/lib/python3.6/runpy.py\", line 96, in _run_module_code\n mod_name, mod_spec, pkg_name, script_name)\n File \"/usr/lib/python3.6/runpy.py\", line 85, in _run_code\n exec(code, run_globals)\n File \"/tmp/ansible_postgresql_privs_payload_gsems1r4/ansible_postgresql_privs_payload.zip/ansible/modules/database/postgresql/postgresql_privs.py\", line 1057, in <module>\n File \"/tmp/ansible_postgresql_privs_payload_gsems1r4/ansible_postgresql_privs_payload.zip/ansible/modules/database/postgresql/postgresql_privs.py\", line 1038, in main\n File \"/tmp/ansible_postgresql_privs_payload_gsems1r4/ansible_postgresql_privs_payload.zip/ansible/modules/database/postgresql/postgresql_privs.py\", line 752, in manipulate_privs\nTypeError: '<' not supported between instances of 'NoneType' and 'NoneType'\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}
```
related changes where backported by https://github.com/ansible/ansible/pull/65098

Seems that we need to add conditions to *.sort() if they are no empty/None, etc

##### ISSUE TYPE
- Bug Report

##### COMPONENT NAME
```postgresql_privs```
```lib/ansible/modules/database/postgresql/postgresql_privs.py```

##### ANSIBLE VERSION
<!--- Paste verbatim output from "ansible --version" between quotes -->
```paste below
2.9.2
```
in 2.9.1 it was ok

##### CONFIGURATION
Doesn't matter

##### OS / ENVIRONMENT
Doesn't matter


##### STEPS TO REPRODUCE
```yaml
    - name: Create permissions for {{ client }}
      postgresql_privs:
        db: '{{ client }}'
        roles: '{{ client }}'
        privs: ALL
        objs: ALL_IN_SCHEMA
      register: result
      retries: 3
      delay: 10
      until: result is not failed
      become: true
      become_user: postgres
```

<!--- HINT: You can paste gist.github.com links for larger files -->

##### EXPECTED RESULTS
``` ```

##### ACTUAL RESULTS
```
{"attempts": 3, "changed": false, "module_stderr": "Traceback (most recent call last):\n File \"<stdin>\", line 102, in <module>\n File \"<stdin>\", line 94, in _ansiballz_main\n File \"<stdin>\", line 40, in invoke_module\n File \"/usr/lib/python3.6/runpy.py\", line 205, in run_module\n return _run_module_code(code, init_globals, run_name, mod_spec)\n File \"/usr/lib/python3.6/runpy.py\", line 96, in _run_module_code\n mod_name, mod_spec, pkg_name, script_name)\n File \"/usr/lib/python3.6/runpy.py\", line 85, in _run_code\n exec(code, run_globals)\n File \"/tmp/ansible_postgresql_privs_payload_gsems1r4/ansible_postgresql_privs_payload.zip/ansible/modules/database/postgresql/postgresql_privs.py\", line 1057, in <module>\n File \"/tmp/ansible_postgresql_privs_payload_gsems1r4/ansible_postgresql_privs_payload.zip/ansible/modules/database/postgresql/postgresql_privs.py\", line 1038, in main\n File \"/tmp/ansible_postgresql_privs_payload_gsems1r4/ansible_postgresql_privs_payload.zip/ansible/modules/database/postgresql/postgresql_privs.py\", line 752, in manipulate_privs\nTypeError: '<' not supported between instances of 'NoneType' and 'NoneType'\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}
```

'''
RETURN = r'''
queries:
  description: List of executed queries.
  returned: always
  type: list
  sample: ['REVOKE GRANT OPTION FOR INSERT ON TABLE "books" FROM "reader";']
  version_added: '2.8'
'''
import traceback
PSYCOPG2_IMP_ERR = None
try:
    import psycopg2
    import psycopg2.extensions
except ImportError:
    PSYCOPG2_IMP_ERR = traceback.format_exc()
    psycopg2 = None
from ansible.module_utils.basic import AnsibleModule, missing_required_lib
from ansible.module_utils.database import pg_quote_identifier
from ansible.module_utils.postgres import postgres_common_argument_spec
from ansible.module_utils._text import to_native
VALID_PRIVS = frozenset(('SELECT', 'INSERT', 'UPDATE', 'DELETE', 'TRUNCATE',
                         'REFERENCES', 'TRIGGER', 'CREATE', 'CONNECT',
                         'TEMPORARY', 'TEMP', 'EXECUTE', 'USAGE', 'ALL', 'USAGE'))
VALID_DEFAULT_OBJS = {'TABLES': ('ALL', 'SELECT', 'INSERT', 'UPDATE', 'DELETE', 'TRUNCATE', 'REFERENCES', 'TRIGGER'),
                      'SEQUENCES': ('ALL', 'SELECT', 'UPDATE', 'USAGE'),
                      'FUNCTIONS': ('ALL', 'EXECUTE'),
                      'TYPES': ('ALL', 'USAGE')}
executed_queries = []
class Error(Exception):