safe deepmerge