modify insertMany so that it can handle insertions of NULL values