ensuring dict type