Fix potential null pointer exception in yield()

Using the method children() initializes the property children if it is null.
Using the property directly results in a null pointer exception in that case.