def value_or_none(elem):
    """Gets element value or returns None, if element is None

    :param elem: dataset element or None
    :return: element value or None
    """
    return elem.value if elem else None