getError() throws on out-of-bounds access, so this isn't strictly necessary. It's not consistently applied either. However, I think it's a good check against wrapper bugs, so I'm happy to have it.