check_package function

Check if a package is available and provide helpful error message