def decorated_value(tree):
    """
    Get the decorating value from a tree's root node.id.

    Returns `None` if the tree is undecorated

    Parameters
    ----------
    tree: Glycan

    Returns
    -------
    int or None
    """
    try:
        return next(iter(tree.root.id))
    except Exception:
        return None
