type conversion for basic types