fix bug with type checking stirngs