Added in tests for null cases, IllegalStateExceptions, and hard to hit c...

...ases