check if response is an object