better error messages
allow a typeName on an enum (future extension to allow for EJSON registration)
error fixes: oneFn() manyFn() now handle a null this ( which happens in strict mode ).

don't use console.debug which does not exist on the server.

call correct ctor to create error