Added a test case to ensure that 'instance' method returns undefined rather than throw an error