treat undefined like null

makes working with records easier