better cache handling for null values