isInstance function
Checks if the value is an instance
Implementation
bool isInstance(dynamic value) {
if (value == null) return false;
if (value is Instance) return true;
if (value is Map) {
return value.containsKey('instanceId') || value.containsKey('serviceName');
}
return false;
}