restructuring
improved null handling in datadao