Handle Errors and heading from mongo and handle empty column values