kind_of? instead of is_a?
small correction