Checking pkg if it exists.