def METHOD_NAME(value):
    if value:
        try:
            checked = float(value)
        except Exception:
            return 0
        else:
            return checked
    else:
        return 0