prevent chart-s from generating errors when its api is used when it has not enteredDocument.