In Java, I have a function with a signature, where a Type is passed in:

```
public Object convert(Object object, Type type) {
}

```

Inside the function, I want to determine if Type is String, but when I do this

```
String.class.equals(type.getClass())

```

Android Studio is telling me `'equals()' between objects of inconvertible types 'Class<capture of ? extends Type>' and 'Class<String>'`.

What am I doing wrong?