scripting-protolib/src/main/java/com/streamsets/pipeline/stage/processor/scripting/ScriptTypedNullObject.java
public static Field getTypedNullFieldFromScript(Object scriptObject) {
    Field field;
    if(scriptObject == NULL_BOOLEAN)
      field = Field.create(Field.Type.BOOLEAN, null);
    else if(scriptObject == NULL_CHAR)
      field = Field.create(Field.Type.CHAR, null);
    else if(scriptObject == NULL_BYTE)
      field = Field.create(Field.Type.BYTE, null);
    else if(scriptObject == NULL_SHORT)
      field = Field.create(Field.Type.SHORT, null);
    else if (scriptObject == NULL_INTEGER)
      field = Field.create(Field.Type.INTEGER, null);
    else if(scriptObject == NULL_LONG)
      field = Field.create(Field.Type.LONG, null);
    else if (scriptObject == NULL_FLOAT)
      field = Field.create(Field.Type.FLOAT, null);
    else if(scriptObject == NULL_DOUBLE)
      field = Field.create(Field.Type.DOUBLE, null);
    else if(scriptObject == NULL_DATE)
      field = Field.createDate(null);
    else if(scriptObject == NULL_DATETIME)
      field = Field.createDatetime(null);
    else if(scriptObject == NULL_TIME)
      field = Field.createTime(null);
    else if(scriptObject == NULL_DECIMAL)
      field = Field.create(Field.Type.DECIMAL, null);
    else if(scriptObject == NULL_BYTE_ARRAY)
      field = Field.create(Field.Type.BYTE_ARRAY, null);
    else if(scriptObject == NULL_STRING)
      field = Field.create(Field.Type.STRING, null);
    else if(scriptObject == NULL_LIST)
      field = Field.create(Field.Type.LIST, null);
    else if(scriptObject == NULL_MAP)
      field = Field.create(Field.Type.MAP, null);
    else  //this scriptObject is not Null typed field. Return null.
      field = null;
    return field;
  }
public static Field getTypedNullFieldFromScript(Object scriptObject) {
    Field field;
    if(scriptObject == NULL_BOOLEAN)
      field = Field.create(Field.Type.BOOLEAN, null);
    else if(scriptObject == NULL_CHAR)
      field = Field.create(Field.Type.CHAR, null);
    else if(scriptObject == NULL_BYTE)
      field = Field.create(Field.Type.BYTE, null);
    else if(scriptObject == NULL_SHORT)
      field = Field.create(Field.Type.SHORT, null);
    else if (scriptObject == NULL_INTEGER)
      field = Field.create(Field.Type.INTEGER, null);
    else if(scriptObject == NULL_LONG)
      field = Field.create(Field.Type.LONG, null);
    else if (scriptObject == NULL_FLOAT)
      field = Field.create(Field.Type.FLOAT, null);
    else if(scriptObject == NULL_DOUBLE)
      field = Field.create(Field.Type.DOUBLE, null);
    else if(scriptObject == NULL_DATE)
      field = Field.createDate(null);
    else if(scriptObject == NULL_DATETIME)
      field = Field.createDatetime(null);
    else if(scriptObject == NULL_TIME)
      field = Field.createTime(null);
    else if(scriptObject == NULL_DECIMAL)
      field = Field.create(Field.Type.DECIMAL, null);
    else if(scriptObject == NULL_BYTE_ARRAY)
      field = Field.create(Field.Type.BYTE_ARRAY, null);
    else if(scriptObject == NULL_STRING)
      field = Field.create(Field.Type.STRING, null);
    else if(scriptObject == NULL_LIST)
      field = Field.create(Field.Type.LIST, null);
    else if(scriptObject == NULL_MAP)
      field = Field.create(Field.Type.MAP, null);
    else  //this scriptObject is not Null typed field. Return null.
      field = null;
    return field;
  }
Receive a scriptOject and find out if the scriptObect is one of the NULL_**
object defined in this class. If so, create a new field with the type
and null value, then return the field.
If the scriptObject is not one of the typed null object, it returns a
new field with string converted from the value.
@param scriptObject: ScriptObject, this might be one of the Typed Null object.
@return