return noop if document is undefined
make