throw error when doc retrieved doesn't match the couch class you're wrapping with