Setting up site buttons / null object reference

I’m currently trying to build my first flash site…

I have just set up the buttons which get to each ‘section’ via frame labels and the AS3 gotoAndStop function.

These work without error until my ‘sections’ contain movieclips that are referenced in my actionscript layer… Because they do not exist in ‘all frames’, whenever I click my buttons I get the error, “Error #1009: Cannot access a property or method of a null object reference.”

It took me a while to understand and track down why I was getting this. I removed the short bit of code in my actionscripts layer that referenced the movieclips in each section (I had some custom scrollbars set up) and it worked without error.

How do I get around this ?