Same here, pretty much only get it after I've reloaded the UI when working on add-ons.
Code:
local itemCache = self.furnitureCache[ZO_PLACEABLE_TYPE_ITEM]
local bag = itemCache[bagId]
Looking at the code, my guess is that its being executed before the self.furnitureCache is fully initialized. Perhaps a simple fix would simply be to check that variable to make sure its not nil before trying to do stuff with it.