'checks if value can be converted / parsed to arg_type
will raise an error on failure
or will convert it to arg_type and return new converted value
can check for:
- int: will be converted into int
- bool: will be converted to False / True
- list: will always return a list
- string: will do nothing for now
- ignore: will ignore it, just like "string"'

@staticmethod
def _check_param_type(value, name, arg_type):

    error = False
    if (arg_type == u'int'):
        if _is_int(value):
            value = int(value)
        else:
            error = True
    elif (arg_type == u'bool'):
        if (value in (u'0', u'1')):
            value = bool(int(value))
        elif (value in (u'true', u'True', u'TRUE')):
            value = True
        elif (value in (u'false', u'False', u'FALSE')):
            value = False
        elif (value not in (True, False)):
            error = True
    elif (arg_type == u'list'):
        value = value.split(u'|')
    elif (arg_type == u'string'):
        pass
    elif (arg_type == u'ignore'):
        pass
    else:
        logger.log(u'API    ::    Invalid    param    type:    "{0}"    can    not    be    checked.    Ignoring    it.'.format(str(arg_type)), logger.ERROR)
    if error:
        raise ApiError(u'param    "{0}"    with    given    value    "{1}"    could    not    be    parsed    into    "{2}"'.format(str(name), str(value), str(arg_type)))
    return value
