def validate_num_rows(num_rows):
    """ validate the num_rows SQLTableGen param. Return True if valid """
    condition1 = not isinstance(num_rows, int)
    condition2 = num_rows <= 0
    if condition1:
        raise TypeError('num_rows must by positive int but found type {}'.
            format(type(num_rows)))
    elif condition2:
        raise ValueError('num_rows must be positive int but found {}'.
            format(num_rows))
    return True
