Fix crash when some functions are called with integers instead of strings.