def setter_helper(fn, value):
    """
    Some property setters need to call a function on their value -- e.g. str() or float() -- before setting
    the property. But, they also need to be able to accept None as a value, which throws an error.
    This helper solves this problem

    :param fn: function to apply to value
    :param value: value to pass to property setter
    :return: result of fn(value), or None
    """
    return value if value is None else fn(value)