Strange indentation on these lines.

Also, is the check for `search` really needed? The common case is that search is provided and if it is falsey it will fail on the toString check anyway.

```js
        if (this == null || $toString.call(search) == '[object RegExp]') {
          throw TypeError();
        }
```