Minor change to document.rb to prevent exception if sibling is nil

Nothing major, just came across a situation where sibling was nil (with valid ronn/markdown) and an exception was thrown.

Maybe on your next pass you could merge this one too?

Cheers!