Handle caching errors (changed versions or wrong type of serialized objects) correctly