Reordered generator logic to throw CreateInstanceError instead of a cannot be None error