'Build a comparison for columns where values can be NULL.'

def _buildNULLCondition(self, col, val):

    if (val is None):
        return ISNULL(col)
    elif isinstance(val, (int, long)):
        return (col == val)
    else:
        return (col == self.toUTF8(val))
