'function to check passed params for the shorthand wrapper
and to detect missing/required params'

def check_params(self, key, default, required, arg_type, allowedValues, *args, **kwargs):

    if (key in indexer_ids):
        if (u'tvdbid' in kwargs):
            key = u'tvdbid'
        self.indexer = indexer_ids.index(key)
    missing = True
    orgDefault = default
    if (arg_type == u'bool'):
        allowedValues = [0, 1]
    if args:
        default = args[0]
        args = args[1:]
        missing = False
    if kwargs.get(key):
        default = kwargs.get(key)
        missing = False
    if required:
        self._requiredParams = {}.setdefault(key, {u'allowedValues': allowedValues, u'defaultValue': orgDefault, u'type': arg_type})
        if (missing and (key not in self._missing)):
            self._missing.append(key)
    else:
        self._optionalParams = {}.setdefault(key, {u'allowedValues': allowedValues, u'defaultValue': orgDefault, u'type': arg_type})
    if default:
        default = self._check_param_type(default, key, arg_type)
        self._check_param_value(default, key, allowedValues)
    return (default, args)
