Added check and test for invalid an result from the server