relocate useful function

handle javascript f*cking not letting me get to the global object.

throw better error

1.0.20

we do need the dbObjectTypes visible
repo name