Corrosion on the door ajar switch can cause the door ajar warning light and dome light to work intermittently or not at all. A new switch (and possibly a new connector) will be needed to fix the issue.