Object reference not set to an instance of an object

Hi. Im getting this error: NullReferenceException: Object reference not set to an instance of an object
Coins.OnTriggerEnter2D (UnityEngine.Collider2D col) (at Assets/Scripts/Coins.cs:25) And it points at this script. I’m quite new to unity and C# so it might be obvious.

using UnityEngine;
using System.Collections;

public class Coins : MonoBehaviour {

	public GUIText cointext;
	public CoinSpawn coinSpawn;
	public int curCoins;
	public int maxCoins = 10;

	void Update (){
		cointext.text = "Current Coin " + curCoins + "/" + maxCoins;

		if (curCoins > maxCoins) {
						curCoins = maxCoins;
				}
	}


	void OnTriggerEnter2D(Collider2D col){
		Debug.Log("träffar pengen");
				if (col.gameObject.tag == "Coin") {
						Destroy (col.gameObject);
			curCoins++;
			coinSpawn.spawning = false;

				}
		}
}`

This problem has come up a few times since Unity released the 2D stuff, both for OnTriggerEnter2D() and for OnColliderEnter2D(). Not sure if this is a bug or if I don’t understand something. The workaround is to do:

if (col != null && col.gameObject.tag == "Coin") {