from typing import Optional
from typing import Any


def null_str(value: Optional[Any]) -> str:
    """
    Return NULL if the value is None, otherwise str(value).
    """
    if value is None:
        return "NULL"

    return str(value)