Yeah, I got to where you are but I also had to remove the part you've highlighted as DateTime is a ValueType however as you're using the HasValue property you'd have to check whether the type is Nullable.
I'd probably use the below as even if the type isn't Nullable it will still compile (I think, can't check at the minute):
if(beginningDate == null)
{
...
}
I'd probably use the below as even if the type isn't Nullable it will still compile (I think, can't check at the minute):
if(beginningDate == null)
{
...
}