fix #224. Handle null values when replicating data