Fix a call to a string method when options.type is non-string