Better fix your api script to set all values correctly. Your problem can not be reproduced trough the ISPConfig GUI so adding code to prevent a situation that can't be triggered trough ISPConfig does not make much sense,it adds just bloat to the plugin codes. You can not compare this to the apache config file as the apache config file allows users to add custom config in the apache directives field and therefore, this test code exists to check that custom code. The API is a low-level api, so you as the developer have to take care that you set all values correctly on insert in the same way that the iSPConfig GUI is doing it.