Fix json type parsing if the document is empty.