def nullstr(value):
    """
    Return str(value) if bool(value) is not False. Return None otherwise.
    Useful for coercing optional values to a string.

    >>> nullstr(10)
    '10'
    >>> nullstr('') is None
    True
    """
    if value:
        return str(value)