Update ThreadPool.java

possible fix for npe