template parameter's toString() method now called. was failing on bson ids