`isset($response->firstName) && isset($response->lastName)` can be `isset($response->firstName, $response->lastName)` but I wonder if this line is still too complicated.

`empty()` would drastically reduce the number of checks for the conditions.