Resolves: fdo#82747 Crash on opening wikipedia ODT Book

Test if there's indeed a subnode before testing its type

Cherry-picked from 3d34eb4612fa59fae7594399d3d6f798ddb35582

Change-Id: I1bb32652ceb82b0818a8d2cd8d71b46dd96ef2aa
Reviewed-on: https://gerrit.libreoffice.org/11050
Reviewed-by: Thomas Arnhold <thomas@arnhold.org>
Tested-by: Thomas Arnhold <thomas@arnhold.org>
Reviewed-on: https://gerrit.libreoffice.org/11083