Added type check to IndexSpace comparison operator