* While it's not feasible to completely protect against invalid use of
APIs (or at least, it would be outside the scope of the project), we
can at least add some friendlier/more clear messages to the asserts we
already have, and add some simple NULL checks.
* This won't cover everything but at least it's better than nothing and
might give a better idea of what the problem is.