from typing import Union


def serialize_attribute_value(value: Union[str, int, float, bool, None]):
    """
    Serialize a value to be stored in a Magento attribute.
    """
    if isinstance(value, bool):
        return "1" if value else "0"
    elif value is None:
        return ""
    return str(value)