Simplify this line, split into 2:

```
type = type || this.checkUrl( baseUrl );
data.type = type;
```