Fixing error message for indexOf when no arguments are supplied