instead of this check, you should initialize the children collection in the constructor with a doctrine ArrayCollection