If there is no main node there is no way to fetch the children and it ends up crashing on a null object.
Added a check that returns an empty meta data array on missing main node.
If there is no main node there is no way to fetch the children and it ends up crashing on a null object.
Added a check that returns an empty meta data array on missing main node.