better DRY! Use a private function to check for package dependencies