added better validation for xSortBy