Catch NullPointerException resulting from the recent extraction of PackageType