Adds shouldBeSorted to IsSorted contract helper method.