verify if data sent is valid in readLine