def _cb_dist(ctx, param, value):
    """
    Click callback to ensure `--distance` can be either a float or a field name.
    """
    try:
        return float(value)
    except ValueError:
        return value
