Add missing check for empty or single element arrays in merge sort.