This should avoid some possible exceptions
```python
if not isinstance(test_string, str):
    return False
```