tightened code for handling connection pool size to check for number type specifically