Better error checking of introspection