Better error handling in Document.find_tags