Added a method to enforce a var to be a string.