def num(s, filt=float):
    """Helper for numeric fields - we accept a string, convert it using filt,
    and will return an empty string if there is a ValueError converting
    """
    if not s:
        return ""
    try:
        return filt(s)
    except ValueError:
        return ""