Check syncObj in submitWorkflow. When appContext is not null, syncObj is set to null, and we should check it before access it.