def currency(currency):
    """
    Makes sure currency is valid.
    """
    if currency is None:
        return True
    if not isinstance(currency, str):
        raise TypeError('currency must be None or str.')
    return True
