Having a issue with a NullReferenceException

Hello, Im somewhat new to c# I’m working on programming a traffic light when a NullReferenceException is blocking me.

public class TrafficLight : MonoBehaviour {

[SerializeField]private float greenLight = 5.0f;
[SerializeField]private float yellowLight = 5.0f;
[SerializeField]private float redLight =  5.0f; 
public GameObject CurObject;
private float timePassed;

void Start()
{
	ResetTimeSinceLastRestart ();
	GetComponent<Renderer> ().material.color = Color.gray;
}

void Update()
{
	timePassed += Time.deltaTime; 
}

public float GetTime()
{
	return timePassed;
}

public void ResetTimeSinceLastRestart()
{
	timePassed = 5.0f;
}
public float GetRedTime()
{
	return redLight;
}

public float GetYellowTime()
{
	return yellowLight;
}

public float GetGreenTime()
{
	return greenLight;
}

}

and my StateMachine Script
public class TrafficLightStateMachine : MonoBehaviour {

private TrafficLight target;
private TrafficStates curState = TrafficStates.redLight;
private Dictionary<TrafficStates, Action> fsm = new Dictionary<TrafficStates, Action>();

enum TrafficStates
{
	greenLight,
	yellowLight,
	redLight
}

void Start () 
{
	//this accesses the Data Model Script
	GetComponent<TrafficLight> ();
	//this is my dictionary
	fsm.Add (TrafficStates.redLight, new Action (RedState));
	fsm.Add (TrafficStates.yellowLight, new Action (YellowState));
	fsm.Add (TrafficStates.greenLight, new Action (GreenState));
	//This is the default state.
	SetState (TrafficStates.redLight);
}

void Update () 
{
	fsm [curState].Invoke();
}

//If the time is greater than timepassed it will transition to the next function: the Yellow light.
void RedState()
{
	if (target.GetRedTime() > target.GetTime())
	{
		GameObject greenObj = GameObject.Find("Green Light");

		greenObj.GetComponent<Renderer>().material.color = Color.green;

		SetState (TrafficStates.greenLight);
	}
}
//only pay attention to RedState, if i figure out how to fix the red state the rest should follow.
void YellowState()
{
	if (target.GetYellowTime() > target.GetTime())
	{
		GameObject RedObj = GameObject.Find("Red Light");

		RedObj.GetComponent<Renderer> ().material.color = Color.red;

		SetState (TrafficStates.redLight);
	}
}

void BlinkingYellowState()
{

}

void GreenState()
{
	if (target.GetGreenTime() > target.GetTime())
	{
		GameObject yellowObj = GameObject.Find("Yellow Light");

		yellowObj.GetComponent<Renderer> ().material.color = Color.yellow;

		SetState (TrafficStates.yellowLight);
	}
}
void SetState(TrafficStates newState)
{
	curState = newState;
}

}

the errors appear on these two lines:
NullReferenceException: Object reference not set to an instance of an object
TrafficLightStateMachine.RedState () (at Assets/Lab 1_TrafficLight/Scripts/TrafficLightStateMachine.cs:40)
TrafficLightStateMachine.Update () (at Assets/Lab 1_ Traffic Light/Scripts/TrafficLightStateMachine.cs:33)

I’m not sure what the error is and I’ve been trying for hours.

You didn’t initialize target

 void Start () 
     {
         //this accesses the Data Model Script
         GetComponent<TrafficLight> ();
         //this is my dictionary
    .......

it should be

void Start () 
     {
         //this accesses the Data Model Script
         target = GetComponent<TrafficLight> ();
         //this is my dictionary
    .......