Check in mergesort