Updated mapping code for Dict type