Finding DBNull in a datatable generated from SQL query and assign activity

I have 5*5 datatable which is generated from a sql query.
All values are of datetime type.
Some random values in this dt can be null in db which returns value as DBNull.
Next step is to assign these values to specific variables for which I use function like
Convert.ToDateTime(Dt.Rows(index).Item(“columnName”))

This function throws an error when NULL value is passed from SQL query.
Object cannot be cast from DBNull to other types.

Looking for best way to handle the situation.
I can always loop through the datatable and individually handle the specific null data.
Looking for a way that helps me use a multi assign activity where it skips assignment in case it finds a DBNull

Hi @SnehajitDas

Assign activity:
variable1 = If(IsDBNull(Dt.Rows(index).Item("columnName")), "", Convert.ToDateTime(Dt.Rows(index).Item("columnName")))

Regards

Yeah, something similar to this wanted.
But problem is “” can’t be assigned to a datetime variable.
I will try with Generic variable and see if the end result can be achieved.

then assign null again or a default date