Add check for empty response