Revert "Add null checks when scanning a package." This reverts commit 9e7ac3ba8405f22c11629091449ff35a06b72055.