check if response.data is undefined