Fix serialization

Fix the serialization code in https://github.com/Bukkit/Bukkit/pull/1077
`map.get` with a non-existent key returns null, which is exactly what we want here.