Why am I getting a "NullReferenceException" for a Instantiate line?

I’ve had this weird problem I’ve been trying to figure out for a few hours, I gave up and was wondering if you guys could help. On this line “var coconut = Instantiate (coconutprefab, Vector3(transform.localPosition.x, transform.position.y + 2.5, transform.localPositionn.z - 2.0), Quaternion.identity);” I get a NullReferenceException error. However if i change “Vector3("stuff")” to “Vector3(0,0,0)” it works. I have made sure all the variables have been connected to objects. This was working fine this morning, I don’t know what happened.

function sinstunned() {
stuncooldown = true;
if (coconutcount.coconutsCollected > 0 && spawnerwait == false) {
spawnerwait = true;
coconutcount.coconutsCollected = coconutcount.coconutsCollected - 1;
var coconut = Instantiate (coconutprefab, Vector3(player.transform.localPosition.x, player.transform.position.y + 2.5, player.transform.localPositionn.z - 2.0), Quaternion.Inverse(coconutprefab.transform.rotation));
coconut.transform.rotation = Quaternion.Inverse(player.transform.rotation);
coconut.GetComponent(CollectCoconut).player = cocoCharController;
coconut.animation["ArmatureAction"].speed = -1;
coconut.animation["ArmatureAction"].time = coconut.animation["ArmatureAction"].length;
coconut.animation.Play("ArmatureAction");
}
walkscript.enabled = false;
thirdcharmotor.enabled = false;
player.animation.Play("OrcStun2");
yield WaitForSeconds (2.0);
walkscript.enabled = true;
thirdcharmotor.enabled = true;
OrcStun = false;

yield WaitForSeconds (1.0);
stuncooldown = false;
spawnerwait = false;
}

Looks like you misspelled position a few times (positionn)