@staticmethod
def coerce_quotes(quotes):
    """Coerce a quote type into an acceptable value, or raise an error."""
    orig, quotes = quotes, str(quotes) if quotes else None
    if quotes not in [None, '"', "'"]:
        raise ValueError('{!r} is not a valid quote type'.format(orig))
    return quotes
