determine different data types in JS