def to_float(string):
    """Converts a string to a float if possible otherwise returns None

    :param string: a string to convert to a float
    :type string: str
    :return: the float or None if conversion failed and a success flag
    :rtype: Union[Tuple[float, bool], Tuple[None, bool]]
    """
    try:
        return float(string), True
    except ValueError:
        return None, False