##### SUMMARY
See https://github.com/ansible/ansible/blob/88d8cf8197c53edd3bcdcd21429eb4c2bfbf0f6a/lib/ansible/module_utils/basic.py#L699-L706

##### ISSUE TYPE
- Bug Report

##### COMPONENT NAME
lib/ansible/module_utils/basic.py

##### ANSIBLE VERSION
```paste below
2.9
devel
```

if wanted_elements:
                    if wanted != 'list' or not isinstance(param[k], list):
                        msg = "Invalid type %s for option '%s'" % (wanted_name, param)
                        if self._options_context:
                            msg += " found in '%s'." % " -> ".join(self._options_context)
                        msg += ", elements value check is supported only with 'list' type"
                        self.fail_json(msg=msg)
                    param[k] = self._handle_elements(wanted_elements, k, param[k])
            except (TypeError, ValueError) as e:
                msg = "argument %s is of type %s" % (k, type(value))
                if self._options_context:
                    msg += " found in '%s'." % " -> ".join(self._options_context)
                msg += " and we were unable to convert to %s: %s" % (wanted_name, to_native(e))
                self.fail_json(msg=msg)
    def _set_defaults(self, pre=True, spec=None, param=None):
        if spec is None:
            spec = self.argument_spec
        if param is None:
            param = self.params
        for (k, v) in spec.items():
            default = v.get('default', None)
            if pre is True:
                
                if default is not None and k not in param:
                    param[k] = default
            else:
                
                if k not in param:
                    param[k] = default
    def _set_fallbacks(self, spec=None, param=None):