def try_get_value(obj, name, default):
    """
    Try to get a value that may not exist.
    If `obj.name` doesn't have a value, `default` is returned.
    """
    try:
        return getattr(obj, name)
    except LookupError:
        return default