# isType static method

bool isType(

1. dynamic value,
2. Type type

)

Checks whether `value` is of type `type`.

Example:

    bool isString = Instance.isType("Hello", String); // true
    bool isInt = Instance.isType(42, int); // true

## Implementation

    static bool isType(dynamic value, Type type) {
      if(value.runtimeType == type) {
        return true;
      }

      if(value.runtimeType.toString() == type.toString()) {
        return true;
      }

      if(type.toString().startsWith("Map")) {
        return value is Map;
      }

      return value.runtimeType.toString().replaceAll("_", "") == type.toString().replaceAll("_", "");
    }