Ensure str_trim returns a character when character(0) is input 

Addresses Issue #31. I tried putting the logic statement in `check_string`, but this broke tests of special cases with `character(0)` in `str_match` and `str_detect`.