Add a 'tryCatch' when modifying 'map0' in 'checkMap'