(javascript) object refrence not set to an instance of an object

whenever i hit the play button i receive an error that says

NullReferenceException: Object reference not set to an instance of an object
dovemoveup.Update () (at Assets/dovemoveup.js:11)

this is the script

var timer : Countdown;
var anim : Animator;

function Start ()

{

anim = GetComponent("Animator");

}

function Update ()

{

if(timer.time <= 0f);
{
	anim.SetBool("open",true);

}

}

I don’t fully understand what you are doing here, but I think the issue is that you are never giving a value to your “timer” variable, and so it is always null at that point. You will have to actually set timer to some object to make it work. I presume this would be an instance of whatever your Countdown object is.