def type_coerce(type_, value, fallback):
    """Return type_(value), on ValueError return fallback."""
    # turn user parameters into int/float where there is no try/except already
    try:
        return type_(value)
    except ValueError:
        return fallback