check if element is in range for sorted fetch