simplify the response undefined check from #62