if response is not null and if it is successful