When value is null, don't try to convert to Date, instead just leave it

I ran into a problem when I have allowed null on a Date-Field and if I tried to match against
null it didn't work. Instead a Date with "Invalid Date" has been put into this field.

I don't know if there needs to be some additional checks, but I think it should work out.