use kind_of? for checking exceptions