# Check to see if movieclip exists without throwing errors

**URL:** <https://forum.kirupa.com/t/check-to-see-if-movieclip-exists-without-throwing-errors/299582>\
**Category:** flash\
**Created:** [November 7, 2009, 5:47am UTC](https://forum.kirupa.com/t/check-to-see-if-movieclip-exists-without-throwing-errors/299582 "2009-11-07T05:47:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![four4swords](https://avatars.discourse-cdn.com/v4/letter/f/87869e/32.png) [@four4swords](https://forum.kirupa.com/u/four4swords)\
**Post date:** [November 7, 2009, 5:47am UTC](https://forum.kirupa.com/t/check-to-see-if-movieclip-exists-without-throwing-errors/299582/1 "2009-11-07T05:47:55Z")

</div>

Hi,

What can I use to check if a movieclip has been added to the stage yet without flash throwing a bunch of errors at me?

For example, I have a movieclip with the instance name(mcONE) on my stage.  
And I’m currently using this bit of code to check if it’s on the stage

```auto
trace(stage.contains(mcONE))

```

It works when the clip is there… it returns “true”… but when it’s not… it gives a huge list of errors…

I just want it to return either “true” or “false”… not “TypeError: Error #2007: Parameter child must be non-null.”

Maybe I’m using it wrong. What function can I use to check whether a clip exists or not… without giving me errors?

Thanks
