from typing import Union


def lod_to_string(lod: Union[int, float]) -> Union[str, None]:
    """Convert and LoD integer or float to string.
    """
    if lod is None:
        return None
    elif isinstance(lod, str):
        return lod
    elif isinstance(lod, int):
        return str(lod)
    elif isinstance(lod, float):
        return str(round(lod, 1))
    else:
        raise ValueError(f"Type {type(lod)} is not allowed as input")