Adding check for configOptions being an object and merging into an empty object