<!--- 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}
```

objs = frozenset(obj.upper() for obj in p.objs.split(','))
                if not objs.issubset(VALID_DEFAULT_OBJS):
                    module.fail_json(
                        msg='Invalid Object set specified: %s' % objs.difference(VALID_DEFAULT_OBJS.keys()))
            
            valid_objects_for_priv = frozenset(obj for obj in objs if privs.issubset(VALID_DEFAULT_OBJS[obj]))
            if not valid_objects_for_priv == objs:
                module.fail_json(
                    msg='Invalid priv specified. Valid object for priv: {0}. Objects: {1}'.format(
                        valid_objects_for_priv, objs))
        else:
            objs = p.objs.split(',')
            
            if p.type == 'function':
                objs = [obj.replace(':', ',') for obj in objs]
        
        if p.roles == 'PUBLIC':
            roles = 'PUBLIC'
        else:
            roles = p.roles.split(',')
            if len(roles) == 1 and not role_exists(module, conn.cursor, roles[0]):
                module.exit_json(changed=False)
                if fail_on_role:
                    module.fail_json(msg="Role '%s' does not exist" % roles[0].strip())
                else:
                    module.warn("Role '%s' does not exist, nothing to do" % roles[0].strip())
        
        if p.target_roles and not p.type == 'default_privs':
            module.warn('"target_roles" will be ignored '
                        'Argument "type: default_privs" is required for usage of "target_roles".')