def _get_first_of(obj, *args):
    """
    Helper function, returns first existing property of the object that is not None.
    :param obj:
    :param args: variadic, names of the properties
    :return:
    """
    for arg in args:
        if hasattr(obj, arg):
            prop = getattr(obj, arg)
            if prop is not None:
                return prop

    return None