Better error message when trying to deserialize a custom EJSON type

Right now the error message just says "undefined is not a function" and takes some time to figure out. This situation can happen when you've stored some data with a custom type defined but are trying to retrieve it without the type defined (or maybe if you defined only on client or server and are trying to send the object back and forth).