added null check in canAddChildNode()