def _valid_number(data: str) -> bool:
    """ Checks if a data is valid integer or float number. """
    try:
        if data.isdigit():
            return isinstance(int(data), int)
        else:
            return isinstance(float(data), float)
    except ValueError:
        return False