def isfloat(string: str) -> bool:
    """
    This function receives a string and returns if it is a float or not.

    :param str string: The string to check.
    :return: A boolean representing if the string is a float.
    :rtype: bool
    """

    try:
        float(string)
        return True
    except (ValueError, TypeError):
        return False