def is_float(arg):
    """ Returns True iff arg is a valid float """
    if isinstance(arg, float) or isinstance(arg, int):
        return True
    try:
        float(arg)
    except ValueError:
        return False
    return True