Verifies the provided data is a string, otherwise throws provided error.
| Name | Type | Optional | Description |
|---|---|---|---|
| data | string | No | The string resolvable to resolve |
| error | typeof Error | Yes | The Error constructor to instantiate. Defaults to Error |
| errorMessage | string | Yes | The error message to throw with. Defaults to "Expected string, got instead." |
| allowEmpty | boolean | Yes | Whether an empty string should be allowed |