remove unnecessary null check in worker_thread