Check whether IdentityMap is defined. (for AR 3.0.x and >= 4.0)