added checks to prevent errors if the configuration object is incomplete