def invalid_layout?(layout)
      !document.data["layout"].nil? && layout.nil? && !(document.is_a? Bunto::Excerpt)
    end
def invalid_layout?(layout)
      !document.data["layout"].nil? && layout.nil? && !(document.is_a? Bunto::Excerpt)
    end
rubocop: enable RescueException
 Checks if the layout specified in the document actually exists

 layout - the layout to check

 Returns true if the layout is invalid, false if otherwise