from typing import Any


def is_null(ptr: Any) -> bool:
    """
    Tests if a value represents the null pointer.
    """
    if ptr is None:
        return True
    if isinstance(ptr, int):
        return ptr == 0
    if getattr(ptr, "value", False):
        return ptr.value == 0
    return False