def convert_float(d: Dict[str, Any], key: str) -> None:
    """
    Modifies ``d[key]``, if it exists, to convert it to a float or ``None``.

    Args:
        d: dictionary
        key: key
    """
    if key not in d:
        return
    value = d[key]
    if value is None or (isinstance(value, str) and not value.strip()):
        d[key] = None
    else:
        d[key] = float(value)