added exception when non array data is passed to insert batch function