Something that might help you save some precious time of your life.
If you get this error with (perhaps) a class you’ve coded, try this:
Don’t give the variable the same name as the class you want to instantiate…
var MyClass = MyClass();
var varName = MyClass();
will probably work.