Get the cleaning pen for your lens. If you change lens or not, dust will settle on the sensor. You will need to buy a blower for that since the D40 does not shake the dust off. A bag will be nice to have, but other than that, you will find out what you are missing later from shooting.
I just started to get into photography and bought an entry level/basic nikon d40 - and am wondering whether or not to get any accessories? Is it wise to get things such as the lens cleaning pen? UV/FDL/Macro and other filters? if so what are ones I should look into - there is a thing on ebay for 15$ ish? for 3 different filters. So much stuff I know nothing about. As for my usage - I plan to do mostly casual photos and some landscape/flowers etc (beginner stuff). Thanks for your help:)!