I believe we could get here if `clazz` is `null`, in which case we would throw a NPE in the middle of the catch block.

My preference is for this method to throw `IllegalArgumentException`  (with a useful error message) if `class` is `null`