workqueue: Add checks for NULL objects to ensure we are no dereferencing a NULL object

Conflicts:

	kernel/workqueue.c