Can you please add an extra check in case the magic item in the config is not valid?