if ( cCurr.get( iaUnitTypes[k] ) != cPrev.get( iaUnitTypes[k] ) )
if ( cCurr != null && cPrev != null && cCurr.get( iaUnitTypes[k] ) != cPrev.get( iaUnitTypes[k] ) )
	public static final int computeUnit( DataSetIterator dsi )	{		Calendar cCurr, cPrev;		for ( int k = 0; k < iaUnitTypes.length; k++ )		{			cPrev = (Calendar) dsi.last( );			dsi.reset( );			while ( dsi.hasNext( ) )			{				cCurr = (Calendar) dsi.next( );				if ( cCurr.get( iaUnitTypes[k] ) != cPrev.get( iaUnitTypes[k] ) )				{					return iaUnitTypes[k]; // THE UNIT FOR WHICH A DIFFERENCE					// WAS NOTED				}				cPrev = cCurr;			}		}		// if all no difference, return year as default unit.		return Calendar.YEAR;	}