public boolean isEmptyValue( String valueName ) throws KettleValueException {
    int idx = rowMeta.indexOfValue( valueName );
    if ( idx < 0 ) {
      throw new KettleValueException( "Unknown column '" + valueName + "'" );
    }

    ValueMetaInterface metaType = rowMeta.getValueMeta( idx );
    // find by source value type
    switch ( metaType.getType() ) {
      case ValueMetaInterface.TYPE_STRING:
        return rowMeta.getString( data, idx ) == null;
      case ValueMetaInterface.TYPE_BOOLEAN:
        return rowMeta.getBoolean( data, idx ) == null;
      case ValueMetaInterface.TYPE_INTEGER:
        return rowMeta.getInteger( data, idx ) == null;
      case ValueMetaInterface.TYPE_NUMBER:
        return rowMeta.getNumber( data, idx ) == null;
      case ValueMetaInterface.TYPE_BIGNUMBER:
        return rowMeta.getBigNumber( data, idx ) == null;
      case ValueMetaInterface.TYPE_BINARY:
        return rowMeta.getBinary( data, idx ) == null;
      case ValueMetaInterface.TYPE_DATE:
      case ValueMetaInterface.TYPE_TIMESTAMP:
        return rowMeta.getDate( data, idx ) == null;
      case ValueMetaInterface.TYPE_INET:
        return rowMeta.getString( data, idx ) == null;
    }
    throw new KettleValueException( "Unknown source type: " + metaType.getTypeDesc() );
  }
@Test
  public void testEmptyValues() throws Exception {
    RowMeta rowsMetaEmpty = new RowMeta();

    rowsMetaEmpty.addValueMeta( new ValueMetaString( "str" ) );
    rowsMetaEmpty.addValueMeta( new ValueMetaBoolean( "bool" ) );
    rowsMetaEmpty.addValueMeta( new ValueMetaInteger( "int" ) );
    rowsMetaEmpty.addValueMeta( new ValueMetaNumber( "num" ) );
    rowsMetaEmpty.addValueMeta( new ValueMetaBigNumber( "bignum" ) );
    rowsMetaEmpty.addValueMeta( new ValueMetaBinary( "bin" ) );
    rowsMetaEmpty.addValueMeta( new ValueMetaDate( "date" ) );
    rowsMetaEmpty.addValueMeta( new ValueMetaTimestamp( "timestamp" ) );
    rowsMetaEmpty.addValueMeta( new ValueMetaInternetAddress( "inet" ) );
    row = new RowMetaAndData( rowsMetaEmpty, null, null, null, null, null, null, null, null, null );
    assertTrue( row.isEmptyValue( "str" ) );
    assertTrue( row.isEmptyValue( "bool" ) );
    assertTrue( row.isEmptyValue( "int" ) );
    assertTrue( row.isEmptyValue( "num" ) );
    assertTrue( row.isEmptyValue( "bignum" ) );
    assertTrue( row.isEmptyValue( "bin" ) );
    assertTrue( row.isEmptyValue( "date" ) );
    assertTrue( row.isEmptyValue( "timestamp" ) );
    assertTrue( row.isEmptyValue( "inet" ) );
  }