It should just plain fail if a package isn't installed, because then you don't have its package hook installed either, and can't collect any sensible information (i. e. nothing that isn't already publicly known, such as what the current version of that package is).
It should just plain fail if a package isn't installed, because then you don't have its package hook installed either, and can't collect any sensible information (i. e. nothing that isn't already publicly known, such as what the current version of that package is).