Send error if there is real error, not only when data is empty
Implemented correct '<' operator needed for sort/lower_bound algorithms