The get_title example should handle whitespace-only titles

Previously, we asserted that the title's first child was a text node; this does not hold if the title consists solely of whitespace. As a result, it would for example assert for `<title> </title>`.