bail if no document so you can require on server

useful for shared server / client code like backbone views