cluda/dtypes: added detect_type() with the common pattern of checking value data type
transformations: more accurate type detection in scale_const()