Check string is a string, avoid error if it's null or otherwise