It's a trap! let ds; if (unleash.isEnabled('ds.fullyoperational')) ds = new Deathstar(); // ... ds.Attack("Rebel fleet");