Null reference on object that is not null

I’m trying to create a basic timer to display on a text component but for some reason I am getting a null reference and I’m not too sure why. I have set a break point on the line responsible and it is telling me that the text component is populated.

Here is my code:

using UnityEngine;
using System.Collections;
using UnityEngine.UI;

public class TimerDisplay : MonoBehaviour {
    
    public float gameTime;
    Text time;

	// Use this for initialization
	void Start () {
        gameTime = 0.00f;
        time = gameObject.GetComponent<Text>();
        time.text = "00";
    }
	
	// Update is called once per frame
	void Update () {
        gameTime += Time.deltaTime;
        time.text = Mathf.FloorToInt(gameTime).ToString();
	}
}

and I have attached this to a text prefab in game

I’m very new to Unity and I’m not too sure how to approach this. Thanks in advance for any help.

A null reference exception is fired when a variable is not assigned and is called for example

     //Unityscript
      var MyVar:float;
      Debug.Log(MyVar);

     //C-Sharp
      float MyVar;
      Debug.Log(MyVar);

Now to solve this you must assign the variable which is missing

Recommended
An easy way to solve this is to Log every variable one by one (With of course the variable name) and then see which variable was left unassigned

P.S = I see you have a public variable on line 7, try looking at the script in the inspector and fill in the values