It's not clear to me why a falsey `parent` attribute causes an error below it, can we merely use a try/catch statement?