from typing import Optional


def parse_dict_value_to_float(data: dict, key: str) -> Optional[float]:
    """Parse value to float or None if value is None."""
    try:
        parsed_float = float(data.get(key))  # type: ignore
        return parsed_float
    except ValueError:
        raise Exception("Could not parse value to float.")
    except TypeError:
        return None