nullreferenceexception

what im trying to do is when the rigidbody of the Kogel collides with this gameobject, this gameobject must be destroyed.

function OnCollisionEnter(kapot : Collision){

if(kapot.rigidbody.name == "Kogel");
	Destroy(gameObject);

}

this error comes up (why?): NullReferenceException
CrateKapot.OnCollisionEnter (UnityEngine.Collision kapot) (at Assets/Scripts/CrateKapot.js:4)

ps: im new to unity3d,java and excuse for my english

Try using :

function OnCollisionEnter(kapot : Collision)
{    
   if(kapot.gameobject.tag == "Kogel");
    Destroy(gameObject);
}

Did you set the tag?