Manage tern type query.