if  rightComparable/rightIsMap could be moved outside the loop