Use opCast to check whether Date is properly initialized

Replace the non elegant use of opEquals