Hi as per the user before, I am getting the same error.
Following your advice to him, I confirmed that the gridObject was indeed null.
So I then put a the debug.log before my 'gridDebugObject.SetGridObject(GetGridObject(gridPosition));
In the console you can see the 2 dimensional array being completed successfully. And then the nullExceptionError.
I have looked and looked and am sure there are not spelling mistakes or syntax errors, but I have been looking for a long time…
Any advice much appreciated