I usually use if(object!=null) but it doesn't work well.

How can I verify if the class is instantiated. I want to get rid of the 'cannot access a property of a null object or reference'.

Thanks!

I mean, the 'var object:Object;' is just a reference to an Object class instance. When i initialize it with 'object = new Object()' it runs the code in the constructor, initializing it. How can I check if it has been initialized or not.