Added function to convert fields to ints, doubles, or booleans