Add further checks for to ensure undef values are not being saved in the config file
Remove undef values from the config file