from typing import Union
from typing import List
from typing import Optional


def _aslist(value: Union[str, List[str]]) -> Optional[str]:
	""" Ensures that the passed value is converted to a comma-separated list"""
	if value:
		result = value if isinstance(value, str) else ",".join(value)
	else:
		result = None
	return result