Correctly manage null values in the lazy package declaration cache