from typing import Union


def axis_title(title: str, units: Union[str, None]=None) -> str:
    """Create string for axis title with units italicized.

    :param str title: title of axis
    :param str units: units of axis (default: None)
    :returns: formatted axis title
    :rtype: str
    """
    title = title.title()
    if units:
        return '{} ({})'.format(title, r'$\mathit{{{}}}$'.format(units))
    else:
        return '{}'.format(title)