add assertion when map is allocated