Implement fetching of config values with defaults

This PR adds a new method to allow the fetching of config values, along with an added `defaultValue` option. If the config value is not found when this method is called, the default will be returned. Also handy for making sure that a certain object type is returned in some cases.