explicitly check for doc.form.meta in a few places that threw errors