guard package_name lookup against error