python check if data type is dictionary