<!--- 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
<!--- Explain the problem briefly below -->
Reading the [dnf module documentation](https://docs.ansible.com/ansible/latest/modules/dnf_module.html), I should be able to install a yum module just specifing an appstream module name with a profile without the need to specify an appstream version.
But if you omit the appstream version, the dnf ansible plugin crashes with a strack-trace

##### ISSUE TYPE
- Bug Report

##### COMPONENT NAME
dnf

##### ANSIBLE VERSION
<!--- Paste verbatim output from "ansible --version" between quotes -->
```paste below
ansible-playbook 2.8.6
  config file = /home/ansible/.virtualenvs/ansb28/ansible.cfg
  configured module search path = [u'/home/ansible/ansb28/ansible/library']
  ansible python module location = /home/ansible/.virtualenvs/ansb28/lib/python2.7/site-packages/ansible
  executable location = /home/ansible/.virtualenvs/ansb28/bin/ansible-playbook
  python version = 2.7.5 (default, Sep 15 2016, 22:37:39) [GCC 4.8.5 20150623 (Red Hat 4.8.5-4)]

```

##### CONFIGURATION
<!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes -->
```paste below
ANSIBLE_NOCOWS(/home/ansible/.virtualenvs/ansb28/ansible.cfg) = True
DEFAULT_CALLBACK_PLUGIN_PATH(/home/ansible/.virtualenvs/ansb28/ansible.cfg) = [u'/home/ansibleiso/.virtualenvs/ansb28/lib/python2.7/site-packages/ara/plugins/callbacks']
DEFAULT_CALLBACK_WHITELIST(/home/ansible/.virtualenvs/ansb28/ansible.cfg) = [u'ara']
DEFAULT_INVENTORY_PLUGIN_PATH(/home/ansible/.virtualenvs/ansb28/ansible.cfg) = [u'/home/ansibleiso/.virtualenvs/ansb28/ansible/plugins/inventory']
DEFAULT_MODULE_PATH(/home/ansible/.virtualenvs/ansb28/ansible.cfg) = [u'/home/ansibleiso/ansb28/ansible/library']
DEFAULT_ROLES_PATH(env: ANSIBLE_ROLES_PATH) = [u'/home/ansible/infra/roles']

```

##### OS / ENVIRONMENT
<!--- Provide all relevant information below, e.g. target OS versions, network device firmware, etc. -->
management host: CentOS 7
target host: CentOS 8

##### STEPS TO REPRODUCE
<!--- Describe exactly how to reproduce the problem, using a minimal test-case -->
Try to run the following task against a CentOS 8 host:

<!--- Paste example playbooks or commands between quotes below -->
```yaml
- name: Install rhn-client and other required packages (EL8)
  dnf:
    name: "@satellite-5-client/common"
    state: present
  when: ansible_distribution_major_version == "8"

```
The task fails with the following stacktrace:

```
centos8 | FAILED! => {
    "changed": false, 
    "module_stderr": "Shared connection to 10.4.2.130 closed.\r\n", 
    "module_stdout": "Traceback (most recent call last):\r\n  File \"/usr/lib/python3.6/site-packages/dnf/plugin.py\", line 102, in _caller\r\n    getattr(plugin, method)()\r\n  File \"/usr/lib/python3.6/site-packages/dnf-plugins/spacewalk.py\", line 84, in config\r\n    self.cli.demands.root_user = True\r\nAttributeError: 'NoneType' object has no attribute 'demands'\r\n\r\nTraceback (most recent call last):\r\n  File \"/root/.ansible/tmp/ansible-tmp-1571403585.19-28589661305719/AnsiballZ_dnf.py\", line 114, in <module>\r\n    _ansiballz_main()\r\n  File \"/root/.ansible/tmp/ansible-tmp-1571403585.19-28589661305719/AnsiballZ_dnf.py\", line 106, in _ansiballz_main\r\n    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\r\n  File \"/root/.ansible/tmp/ansible-tmp-1571403585.19-28589661305719/AnsiballZ_dnf.py\", line 49, in invoke_module\r\n    imp.load_module('__main__', mod, module, MOD_DESC)\r\n  File \"/usr/lib64/python3.6/imp.py\", line 235, in load_module\r\n    return load_source(name, filename, file)\r\n  File \"/usr/lib64/python3.6/imp.py\", line 170, in load_source\r\n    module = _exec(spec, sys.modules[name])\r\n  File \"<frozen importlib._bootstrap>\", line 618, in _exec\r\n  File \"<frozen importlib._bootstrap_external>\", line 678, in exec_module\r\n  File \"<frozen importlib._bootstrap>\", line 219, in _call_with_frames_removed\r\n  File \"/tmp/ansible_dnf_payload_wsyb0smr/__main__.py\", line 1322, in <module>\r\n  File \"/tmp/ansible_dnf_payload_wsyb0smr/__main__.py\", line 1311, in main\r\n  File \"/tmp/ansible_dnf_payload_wsyb0smr/__main__.py\", line 1290, in run\r\n  File \"/tmp/ansible_dnf_payload_wsyb0smr/__main__.py\", line 957, in ensure\r\n  File \"/tmp/ansible_dnf_payload_wsyb0smr/__main__.py\", line 890, in _is_module_installed\r\nTypeError: 'in <string>' requires string as left operand, not NoneType\r\n", 
    "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", 
    "rc": 1
}
```

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

##### EXPECTED RESULTS
<!--- Describe what you expected to happen when running the steps above -->
The appstream module is installed using the default module version without the need to specify it.

##### ACTUAL RESULTS
<!--- Describe what actually happened. If possible run with extra verbosity (-vvvv) -->
The dnf module crashes


<!--- Paste verbatim command output between quotes -->
```paste below

```

disable_excludes:
    description:
      - Disable the excludes defined in DNF config files.
      - If set to C(all), disables all excludes.
      - If set to C(main), disable excludes defined in [main] in dnf.conf.
      - If set to C(repoid), disable excludes defined for given repo id.
    version_added: "2.7"
  validate_certs:
    description:
      - This only applies if using a https url as the source of the rpm. e.g. for localinstall. If set to C(no), the SSL certificates will not be validated.
      - This should only set to C(no) used on personally controlled sites using self-signed certificates as it avoids verifying the source site.
    type: bool
    default: "yes"
    version_added: "2.7"
  allow_downgrade:
    description:
      - Specify if the named package and version is allowed to downgrade
        a maybe already installed higher version of that package.
        Note that setting allow_downgrade=True can make this module
        behave in a non-idempotent way. The task could end up with a set
        of packages that does not match the complete list of specified
        packages to install (because dependencies between the downgraded
        package and others can cause changes to the packages which were
        in the earlier transaction).
    type: bool
    default: "no"
    version_added: "2.7"
  install_repoquery:
    description:
      - This is effectively a no-op in DNF as it is not needed with DNF, but is an accepted parameter for feature