How to check if Generic Value Variable is Nothing

I am reading an empty cell form excel storing its value in a variable of generic value datatype. I am checking if this variable is empty or not in if else. However, I have tried multiple solutions from other UiPath community posts but nothing is working. Constantly getting the following error: Else If-cont start date: Object reference not set to an instance of an object.

ContStartDate is my generic value variable.

@anushka.prasad

IsNothing(VariableName)

cheers

Hi, thanks for suggestion
But I have tried this, doesnt work.

You can try the following:

variableName Is Nothing

@anushka.prasad

Just tried and no sisue can you please check

Also Variable Is Nothing also would work

cheers

Hi @anushka.prasad

Try this following way:
ContStartDate is of DataType UiPath.Core.GenericValue

If ContStartDate Is Nothing OrElse Object.Equals(ContStartDate, "") 
Then
    LogMessage("ContStartDate is either null or empty.")
Else
    LogMessage("ContStartDate has a value: " & ContStartDate.ToString)
End If

Refer the below image for bwetter understanding:


Hope it helps!!
Regards