instanceOfString function
Like instanceof only takes a String for the object name instead of a constructor object.
Implementation
bool instanceOfString(Object? element, String objectType) {
Object? constructor = _getConstructor(objectType);
return constructor != null && instanceof(element, constructor);
}