How I do to verify if a child was added or not, even it's not a null value

Hi, I’m doing a animation that when you put a mouse over a object it create frame which grows until a certain size and start all over again. Take look the code:


package Animation
 {
 import flash.display.Sprite;
 import flash.display.DisplayObject;
 import flash.display.Shape;
 import flash.events.MouseEvent;
 import flash.utils.Timer;
 import flash.events.TimerEvent;
 import flash.display.DisplayObjectContainer;
 public class OpeningRect extends Sprite
  {
  private var _content:DisplayObject;
  private var _shape:Shape;
  private var _timer:Timer;
  private var _num:Number;
  private var _mouseOut:Boolean;
  
  public function OpeningRect(content:DisplayObject)
   {
   _content = content;
   addChild(_content);
   addEventListener(MouseEvent.MOUSE_OVER, onMouseOver);
   }
  
  public function onMouseOver(event:MouseEvent):void
   {
   _num = 0;
   _mouseOut = false;
   _timer = new Timer(150);
   _timer.addEventListener(TimerEvent.TIMER, effect);
   _timer.start();   
   addEventListener(MouseEvent.MOUSE_OUT, onMouseOut);
   }
  
  public function onMouseOut(event:MouseEvent):void
   {
   _mouseOut = true;
   }
  
  public function effect(timerEvent:TimerEvent):void
   {
   if (_shape != null) 
    removeChild(_shape);
   _shape = new Shape();
   _shape.graphics.lineStyle(_num, 0x2778B3, 1);
   _shape.graphics.beginFill(0, 0);
   _shape.graphics.drawRoundRect(0, 0, _content.width, _content.height, 2, 2);
   addChild(_shape);
   trace(_content.width);
   trace(_num);
   _num += 3;
   if (_num == 15) 
    {
    _num = 0;
    if (_mouseOut)
     {
     _timer.stop();
     if (_shape != null) removeChild(_shape);
     return void;
     }
    }
   }
  }
 }

The problem is that the function, in the line 43, verify if have shape is null or not so the second time that you put the mouse over again the shape is not null anymore but it’s not added in the Sprite. So the solution would be test if the shape is added or not in the Sprite, but I don’t know how to do it.
I would like to know if it is the best way to do that animation.

Thank you very much.