Simplified code that prevents accessing uncreated discrete objects.