Typescript Check If Variable Is String Mutable Or Immutable