[fix] error handling when an object is not created