Checking dictionary type and getting data type with numerical value