added guard for getting the payload from the config.