api: fix crash when reading config options with NULL value (closes #238)