Fix backwards compatibility for keys with value null