from typing import Any


def as_text(value: Any) -> str:
	"""
	Convert the given value to a string. :py:obj:`None` is converted to ``''``.

	:param value: The value to convert to a string.

	:rtype:

	.. versionchanged:: 0.8.0

		Moved from :mod:`domdf_python_tools.utils`.
	"""

	if value is None:
		return ''

	return str(value)