You are apparently using some kind of automated assignment assessing software. You submitted an assignment for grading. The course software tried passing '' (the empty character vector, equivalent to char() ) to your function, and your function returned the value -1 which is not what the assignment specifies should be returned for that input, so it told you that you are wrong.
We do not know what assignment you were doing, or what the correct answer was to that input. You will need to re-read the question more carefully to see what you should have responded with.
I speculate that you were doing the assignment that has been going around about counting the number of matches of a character in a file. The assignment other people have been posting requires that -1 be returned if the input is invalid. I suspect that you are seeing the '' (empty character vector) and considering it to be invalid and so returning -1, but that if you were to read the assignment more carefully you would find that the assignment considers '' to be a valid input and that the number of matches you would expect for it would be 0. Be careful with your validation tests: isempty() is true for both  and '' .