from typing import Callable
from typing import Any


def assert_and_pass(func: Callable, arg: Any):
    """Call ``func``` with ``arg`` and return ``arg``. Additionally allow arg
    to be ``None``.

    Args:
        func:   Test function.
        arg:    Function argument.

    Returns:
        Result of ``func(arg)``.
    """
    if arg is not None:
        func(arg)
    return arg