safe guard on r2[type]