It is probably a matter of comparing a DataValue object with a String object (a DataValue can hold any type of data value... i.e. a number, date, string, document, etc). Simply call the getString() method on the DataValue object to get its string representation for comparison, like this:
if (BillType.getDataValue().getString() == 'COD')