Gd: handling the null condition in the AgentController