def is_equal(arg1, arg2, equality_func):
    """Determines whether two objects are equal."""
    if arg1 is None or arg2 is None:
        if arg1 is not None or arg2 is not None:
            return False
    else:
        if not equality_func(arg1, arg2):
            return False
    return True