check for defined type
fix key passing in agent::param