remove none_type and its complicated typedef from detail namespace, add it as private member class to optional