add some check for dict variable.