def find_nested_meta_first_bf(d, prop_name):
    """Returns the $ value of the first meta element with
    the @property that matches @prop_name (or None).
    """
    m_list = d.get('meta')
    if not m_list:
        return None
    if not isinstance(m_list, list):
        m_list = [m_list]
    for m_el in m_list:
        if m_el.get('@property') == prop_name or m_el.get('@rel') == prop_name:
            return m_el
    return None