add isEmptyCellSelection function to avoid merge if selected cell is not empty.