def check_item_type_uniqueness(tag, previous_tags):
    """
    Check the uniqueness of the 'item type' for an object.
    """
    fail = False
    if not tag.id:
        fail = previous_tags and tag.item_type != previous_tags[0].item_type
    else:
        fail = previous_tags.count() > 1 and tag.item_type != previous_tags[0
            ].item_type
    return fail
