Use instance_of? instead of is_a?