test whether html is actually a document without a doctype

from: https://github.com/haml/html2haml/pull/23#issuecomment-13675693