def _stix_type_of(obj_or_type):
    """
    Get a STIX type from the given value: if a string is passed, it is assumed
    to be a STIX type and is returned; otherwise it is assumed to be a mapping
    with a "type" property, and the value of that property is returned.

    :param obj_or_type: A mapping with a "type" property, or a STIX type
        as a string
    :return: A STIX type
    """
    if isinstance(obj_or_type, str):
        type_ = obj_or_type
    else:
        type_ = obj_or_type["type"]

    return type_