Array with game object: object reference not set to an instance of an object

I have a script which genrates 2d grid out of cubes. Before I made it with 2 for’s and
tile = Instantiate (tilePrefab, Vector3(j, i, 0), Quaternion.identity);

I wanted to easier control those tiles so I made array:

var tileList : GameObject[,];
tileList = new GameObject[y,x];
tileList[j,i] = Instantiate (tilePrefab, Vector3(j, i, 0), Quaternion.identity);

affter that I check in some other array what type is that tile so that I would assing a color to it. It worked fine before but not I get: object reference not set to an instance of an object.

Code is like this:

if(tileGrid[i,j]<15)
  {
  	tileList[i,j].material.color = Color.green;
  	}...

This is in same for loop like that code before. Before I started storing tiles in array it wored perfectly.

I got it answerd on IRC chat. I had to change code in IF statment to somthing like this:
tileList[i,j].renderer.material.color = Color.green;