Add possibility to specify plain object as sort option.