throw error when this.container/document.body are null