       buffer.writeUInt8(1)
 
       # ParamLenData
-      if typeof parameter.value == 'undefined' || parameter == null
-        buffer.writeUInt8(0)
-      else
+      if parameter.value?
         buffer.writeUInt8(1)
         buffer.writeInt8(parameter.value)
+      else
+        buffer.writeUInt8(0)
   0x32:
     type: 'BIT'
     name: 'Bit'

      buffer.writeUInt8(2)

      # ParamLenData
      if typeof parameter.value == 'undefined' || parameter == null
        buffer.writeUInt8(0)
      else
        buffer.writeUInt8(2)
        buffer.writeInt16LE(parameter.value)
  0x38:
    type: 'INT4'
    name: 'Int'

      buffer.writeUInt8(4)

      # ParamLenData
      if parameter.value?
        buffer.writeUInt8(4)
        buffer.writeInt32LE(parameter.value)
      else
        buffer.writeUInt8(0)
  0x3A:
    type: 'DATETIM4'
    name: 'SmallDateTime'
