Error in React with endpoint that returns a string or null

I have a endpoint that check if a user exists in database. Receive a username and password and returns the username if the user exists or null if does not exist. This endpoint works fine (checked with postman)
The problem is that when i call this endpoint, i always get a error. The error is that can read the string because is not a json.
enter image description here

This is the React code when i do the fetch:
enter image description here
This code is called from a component jsx.

Thanks in advance.

I have tried returning a json and works fine. The problem is when the endpoint returns string or null. I need that the endpoint can return a string value.