Pushing GameObject into JS Array returns NullReferenceException

Hey there!

I'm trying to obtain a gameObject inside one array of a class, into a JS Array, so that later I can put it inside a builtin GameObject[] array. However when I try to do that, the Editor returns a NullReferenceException. I can assure you that the variable that's trying to be accessed isn't empty.

Here's the class + array in the script shipWeapons.js:

class WeaponSlot {
var isEnabled : boolean = false; //checks if the weapon is enabled
var weapon_go : GameObject; //weapon GameObject. It contains the projectile
var phaser_point : GameObject; //if the weapon is a beam weapon, it fires from this game object
var torpedo_point : GameObject; //if the weapon is a torpedo weapon, it fires from this game object
var pulse_point : GameObject; //if the weapon is a pulse weapon, it fires from this game object
var nextShot : float = 0.0f; //contains the time reference for when the weapon is able to fire again
var isAngle : boolean = false; //checks if the target is inside the firing arch
var isRange : boolean = false; //checks if the target is in range
var isFiring : boolean = false; //checks if the weapon is firing
var lastReload : float; //total time it took for the last reload
}
var weapon : WeaponSlot[];