'Returns true if supplied data is an int or string with digits'

def _is_number(self, data):

    if isinstance(data, int):
        return True
    elif (isinstance(data, str) and data.isdigit()):
        return True
    return False
