is_a?: check for hierarchy, and also filter var types inside if