Struggling with moving objects using array

Hey guys, I’m really struggling to get this to work. It’s a match three style block puzzle game and at the moment I just want to move my blocks down to the bottom of a grid.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class BoardMovement : MonoBehaviour
{

    public Transform[,] grid = new Transform[columns, rows];
    public static int rows = 9;
    public static int columns = 8;



    // Start is called before the first frame update
    void Start()
    {

    }

    // Update is called once per frame
    void Update()
    {
        if (FindObjectOfType<BlockMovement>().droppedBlock == true)
        {
            updateGrid();
        }

        void updateGrid()
        {

                for (int x = 0; x < rows; ++x)
                {
                    for (int y = 0; y < columns; ++y)
                    {
                        if (grid[x, y] != null)
                        {
                            
                            grid[x, y - 1] = grid[x, y];
                            grid[x, y] = null;
                            grid[x, y - 1].position += new Vector3(0, -1, 0);

                        }
                    }
                }
            
        }
    }
}

So droppedBlock returns true when a group of blocks have been placed in the top row. I just want to move those blocks down to the grid floor. Currently it’s throwing ‘IndexOutOfRangeException’ errors and not moving anything.

Thanks for your time, I’ll give it a whirl.