Fix typo with null check in getInstance.

The behavior was broken in 38698a8.  This should fix it and the test
should ensure it continues to work.
Merge pull request #1 from nubs/master

Fix typo with null check in getInstance.

Thanks for the update, yes I will do a new tag