def _propertyContainerElementTypeName(container, name):
    """Return name of the type of a particular element

    Parameters
    ----------
    container : `lsst.daf.base.PropertySet` or `lsst.daf.base.PropertyList`
        Container including the element
    name : `str`
        Name of element
    """
    try:
        t = container.typeOf(name)
    except RuntimeError as e:
        # KeyError is more commonly expected when asking for an element
        # from a mapping.
        raise KeyError(str(e))
    for checkType in ("Bool", "Short", "Int", "Long", "LongLong", "UnsignedLongLong",
                      "Float", "Double", "String", "DateTime",
                      "PropertySet", "Undef"):
        if t == getattr(container, "TYPE_" + checkType):
            return checkType
    return None