Useful method for checking if any of the causes in a Throwable is of a particular class