from typing import Callable
from typing import Any


def apply_if_not_none(func: Callable[[object], Any], value: object) -> Any:
    """Apply `func` if `value` is not `None`."""
    if value is None:
        return None
    return func(value)