def parse_float(arg):
    """Parses an argument to float number.

    Support converting string `none` and `null` to `None`.
    """
    if arg is None:
        return None
    if isinstance(arg, str) and arg.lower() in ['none', 'null']:
        return None
    return float(arg)