throwing exception if datatype is unsupported