Why does NullReferenceException get called with this script when I click on something other than the Collider2D?

using UnityEngine;
using System.Collections;

public class Crow_Movement : MonoBehaviour {


	public float speedMax = 50;
	public float speedMin = 25;

	float veerMax = 100;
	float veerMin = 0;
	
	void Start() {
		DetermineLeftRight ();
	}

	void Update() {
		if(Application.platform == RuntimePlatform.Android) {
			if(Input.touchCount > 0) {
				if(Input.GetTouch(0).phase == TouchPhase.Began) {
					CheckTouch(Input.GetTouch(0).position, "began");
				}else if(Input.GetTouch(0).phase == TouchPhase.Ended) {
					CheckTouch(Input.GetTouch(0).position, "ended");
				}
			}
		}

		if(Input.GetMouseButtonDown(0)) {
			CheckTouch(Input.mousePosition, "began");
		}
		
		if(Input.GetMouseButtonUp(0)) {
			CheckTouch(Input.mousePosition, "ended");
		}

	}

	void FixedUpdate () {
		rigidbody2D.AddForce (Vector2.up * Random.Range(speedMin, speedMax));
	}

	void DetermineLeftRight() {
		if (Random.Range (1, 10) < 6) {
			rigidbody2D.AddForce (Vector2.right * Random.Range(veerMin, veerMax));
		} else {
			rigidbody2D.AddForce (-Vector2.right * Random.Range(veerMin, veerMax));
		}
	}

	void CheckTouch(Vector3 pos, string phase) {

		Vector3 wp = Camera.main.ScreenToWorldPoint(pos);
		Vector2 touchPos = new Vector2 (wp.x, wp.y);
		Collider2D hit = Physics2D.OverlapPoint (touchPos);

		if (hit.gameObject.name == "Crow" && hit && phase == "began") {
				Debug.Log ("Score!");
		}
	}
}

Because you don’t check if the object you clicked has a collider or not - if not, then hit.gameObject won’t exist, but you are trying to access it.

This should work

if (hit && hit.gameObject.name == "Crow" && phase == "began")

Notice that this will see if “hit” exists or not before comparing anything else.