What's always missing from these is the type checker.
It's always better to check types rigorously and as soon as possible.
If so, then it's doing runtime type checking.
octave> strtrim(" hello world ")
ans = hello world
octave> strtrim([1,2,3,4])
error: strtrim: S argument must be a string or cellstring
error: called from
strtrim at line 79 column 5