Improve use of Assert.notNull

Polish a few of the messages. Replace use of Assert.notNull (which
throws an IllegalArgumentException) with code that throws an
IllegalStateException when it's some state that's being checked.

Fixes #108