isResponseValid receive data as argument.