Only convert data type when it is a valid integer