Protect persistent map

non-compatible keys and values won't be inserted...