def _is_float(val):
    """
    Checks if a token can be converted into a float

    Returns a boolean indicating if the given token can be converted to a float

    :param val: input to be tested, meant to be a string but can be any type
    :type val: string (though any other type is also acceptable)
    :returns: boolean indicating if input can be converted to a float
    :rtype: bool
    """
    try:
        float(val)
    except ValueError:
        return False
    return True