from typing import Optional


def _term_converter(term: Optional[int]) -> Optional[int]:
	"""
	Converter function for ``term`` in :class:`~.BaseProduct``.

	:param term: The number of months that a product lasts for if it is fixed length.
	"""

	if term is None:
		return None
	else:
		return int(term)