Fix get/setMetadata to create the Map if null

This is needed to handle recreating a node from a quickfile