added null check on processQueue message