validate b parameter as positive integer