cast value to int/float