def get_list_of_multiple_or_one_or_empty_from_dict(input, name, vtype=None):
    """
    Extracts objects by 'name' from the 'input' and returns as a list.
    Tries both plural and singular names from the input.
    If vtype is specified, tries to convert each of the elements in the result to this type.

    :param input:       - dict       - Input dictionary. Event of Lambda for example.
    :param name:        - str        - Name of attribute (in plural form).
    :param vtype:       - type       - Type to be converted to. Must be callable. Tested types: str, int, float
    :return:            - list       - List of vtypes, or list of whatever was in input, or empty list.
    :raises ValueError:  In all cases something is wrong.
    """

    if not isinstance(input, dict):
        raise ValueError("'input' attribute must be a dict. Received: {}".format(type(input)))

    if not isinstance(name, str):
        raise ValueError("'name' attribute must be a str. Received: {}".format(type(name)))


    def convert(obj, t):
        return obj if not t else t(obj)


    results = input.get(name) or input.get(name.rstrip('s'))
    if not results:
        return []

    # Wrap to list if not there yet.
    if not isinstance(results, (list, tuple, set)):
        results = [results]
    else:
        results = list(results)

    # Apply vtype convertion if required.
    return [convert(x, vtype) for x in results]