Update ResourceWorkQueue.java

fix for NullPointerException