added check for nil package, in which case the local value is fetched.