I'm not familiar with LinkedIn API, but the simplest solution would be to query the website directly and check the status code of the response.
For example, using the Faraday gem:
res = Faraday.get('http://www.linkedin.com/in/' + person_id)
if res.status == 200
...
end
The disadvantage of this approach is that the entire webpage is fetched every time, even if you only check the status. You can probably find a similar call to the LinkedIn API which would return less data.