NullReferenceException

Hi!
I can’t understand why I get this.
This is an open/close door script, with a timer to close the door.

The script is working. I can play the game, but when I get to this door,
the door will open, but after 3 sec. the door will shut automatically, then I get this error.

NullReferenceException
PlayerCollisions.ShutDoor (UnityEngine.GameObject door) (at Assets/Scripts/PlayerCollisions.js:38)
PlayerCollisions.Update () (at Assets/Scripts/PlayerCollisions.js:18)

The error line is at the bottom with this line “door.audio.PlayOneShot(doorShutSound);”
I would be very grateful if someone can try to help me with this.

#pragma strict
private var doorIsOpen : boolean = false;
private var doorTimer : float = 0.0;
private var currentDoor : GameObject;

var doorOpenTime : float = 3.0;
var doorOpenSound : AudioClip;
var doorShutSound : AudioClip;
function Start () {

}

function Update () {

	if(doorIsOpen) {
		doorTimer += Time.deltaTime;
	if(doorTimer > doorOpenTime){
		ShutDoor(currentDoor);
		doorTimer = 0.0f;
		}
	}
}

function OnControllerColliderHit (Hit : ControllerColliderHit){
	if(Hit.gameObject.tag == "playerDoor"  doorIsOpen == false){
		OpenDoor(Hit.gameObject);
	}
}

function OpenDoor(door : GameObject){
	doorIsOpen = true;
	door.audio.PlayOneShot(doorOpenSound);
	door.transform.parent.animation.Play("dooropen");
}

function ShutDoor(door : GameObject){
	doorIsOpen = false;	
	door.audio.PlayOneShot(doorShutSound);
	door.transform.parent.animation.Play("doorshut");
	}

Click on your Door game object and add an AudioSource. If it already has one, then make sure you have assigned an AudioClip to doorShutSound.

That is all that I can see here.

Thanks for the answer.
I have an audio source, but I have no sound attached to it, since I have the open sound and shut sound in the script.
The script is in the character controller where I choose the sounds.

I tried to attach an audio clip to the audio source to the door object, but I got the same results.