Prefrab sprites array gives NullReferenceException please help

Hello all,

I have prefabs made from sprites which have custom class scripts attached to them. All the scripts extend the same base class. I created a public array of the base class and used the editor to drag all the prefabs into it. This public array is used to instantiate the prefabs. However when I try to run my code I keep getting “NullReferenceException: Object reference not set to an instance of an object” I have checked everything I know. Any help would be greatly appreciated. Bellow is the custom class and the script which uses the array.

using UnityEngine;
using System.Collections;


public class TileMap : MonoBehaviour{

	/*
	Tile types
	0=grass
	1=Chicken Coop
	2=Hay Bale
	3=Pond
	4=Fence
	5=Food Trough
	6=Food Mountain
	7=Player 1 Barn
	8=Player 2 Barn
	9=Player 3 Barn
	10=Player 4 Barn
	 */
	public int[,] board = new int[11, 11];
	//public int numberOfPlayer;
	int quadrant1;
	int quadrant2;
	int quadrant3;
	int quadrant4;
	int rotateSection1;
	int rotateSection2;
	int rotateSection3;
	int rotateSection4;
	public int [][,] gameBoardSections = new int[4][,];
	public TileType[] tileTypes;
	public Sprite[] sprites;
	public TileType testTile;


	void Start(){
		TileMap testMap = new TileMap ();
		testMap.SetBaseBoard (3);
		testMap.GenerateMapVisual ();
	}

	public TileMap(){
	}

	public void SetBaseBoard(int numberPlayers){
		switch (numberPlayers) {
		case 2:
			board[5,5]=6;
			board[5,10]=7;
			board[5,0]=8;
			break;
		case 3:
			board[5,5]=6;
			board[5,10]=7;
			board[5,0]=8;
			board[0,5]=9;
			break;
		case 4:
			board[5,5]=6;
			board[5,10]=7;
			board[5,0]=8;
			board[0,5]=9;
			board[10,5]=10;
			break;
		}
	}

	//int[][,] GetSections(){
		//gameBoardSections [0] = Tile.CreateGameTile (section1,rotateSection1);
		//gameBoardSections [1] = Tile.CreateGameTile (section2,rotateSection2);
		//gameBoardSections [2] = Tile.CreateGameTile (section3,rotateSection3);
		//gameBoardSections [3] = Tile.CreateGameTile (section4,rotateSection4);
		//return gameBoardSections;
	//}

	public void SetWholeBoard(int[][,] _tiles){
		int order = 0;
		int baseX=0;
		int baseY=0;
		foreach (int[,] tile in _tiles) {
			switch(order){
			case 0://tile 1 upper left
				baseX=0;
				baseY=0;
				break;
			case 1://tile 2 upper right
				baseX=6;
				baseY=0;
				break;
			case 2://tile 3 lower left
				baseX=0;
				baseY=6;
				break;
			case 3://tile 4 lower right
				baseX=6;
				baseY=6;
				break;
			}
			for(int i=0;i<tile.GetLength(0);i++) {
				for(int j=0;j<tile.GetLength(1);j++){
					board[i+baseX,j+baseY]=tile[i,j];
				}
			}
			order++;
		}
	}

	public void GenerateMapVisual(){
		for (int i =0; i < board.GetLength(0); i++) {
			for (int j =0; j < board.GetLength(1); j++){
				int type = board[i,j];
				TileType tile = tileTypes[type];
				int id = tile.id;
				Instantiate(tile,new Vector3(i,-j,0),Quaternion.identity);
			}
		}
	}
}

and the class

using UnityEngine;
using System.Collections;
using System;
[System.Serializable]
public class TileType : MonoBehaviour {

	public int moveCost;
	public bool isOccupied = false;
	public int feedGeneration;
	public bool isPassible;
	public string name;
	public int id;

	public TileType(){
	
	}
}

Apprently the script was corrupted I made a new script and copied everything over and it works fine now.