Fix nullability issue in mapMerge