lib: update HashMap and ArrayMap to support nullable keys