Check if a package is installed