Avoid type coercion here, do:

```TypeScript
if(typeof(a) === "string" && a.length > 0)
```