fix null type bug in dependency traversal