I can't begin to tell you how many times I'm working on a project, the project builds, the project deploys, but when I run it I get "Error Occured". After scouring the logs I find: "Object instance not set to an instance of an object". Great. I can't really decide if this is the worst articulated error in SharePoint, or the most accurately labeled error.
Regardless, if you're getting it and reading this, you want to know how to fix it. Basically what the message means is that a variable (Object) didn't get a value it needed and is now being referenced with no value inside, causing our crash. This could be due to a typo; for example if we wanted the value of a column called "Names" and spelled it "Nmaes" (not that I've ever been guilty of that, of course). Because the reference to a SharePoint column inside of a list can be explicit text (ie not via a GUID or ID), it's not necessarily an error compilers will catch. But once we execute this code, the program will not be able to find a column called "Nmaes" and return an error reporting it couldn't get the value in the form of our new favorite error message.
Another way this can happen is if we're expecting a variable to be set with a specific value and either that value is not set or we don't have access to it. This is more likely when the code is compiling; but it's possible we're referencing the wrong field/control, etc from what we're programming. To extend our example above, if we needed the value of "Name" and instead entered "Date"; the field would be valid and the code would attempt to execute. If the field is blank, you'll get the Instance error (even if it has a value, you'll likely get a type mismatch error basically telling you you can't put a system date object in a string without a type cast).
Unfortunately, where the specific error is coming from will depend on your code, but hopefully this helps you point yourself in the right direction!