Replaced if/elses with switch/cases in Field.prototype.decode and Field.prototype.encodeValue in Reflect,js