Add better messages to getTypeWithSchema()