Can anyone tell me why script is not working?

**I am trying to attach this script to my button “onclick” function , so that when i click it and if its color is same as displaycolor “hello” is displayed . But i am getting error message saying- “Object reference not set to an instance of an object” . SO please kindly help. **

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

public class OnClick : MonoBehaviour {
	



public	void SayHello(string hello
	                     ) {

	
		if (GetComponent<Image>().color == GameObject.FindGameObjectWithTag("DisplayButton").GetComponent<Image>().color)
		{

			Debug.Log("Hello");
		}
		
		}
		
		}

You could also eliminate the ‘string hello’ from the method call. Unless you have the button pass a string into the method when you call it. Another piece of information that would be helpful to figure this out would be the line number in monodevelope that your “Object reference not set to an instance of an object” comes from. Best of luck!

Take a look at the code in this link: http://forum.unity3d.com/threads/check-if-a-gameobject-has-a-certain-script.88484/#post-571809