Check if tagMap2 is defined before access when converting from nb v1