datatype check added