Check resource type using resource.get_type()