add conditional check to ensure objective exists before searching