Depends on where you’ve gotten the data. The difference between a user_id and a screen_name is usually pretty clear in Tweet and User objects distributed through the Twitter API – the fields are clearly labeled. When requesting data, always use the explicit approach and for best results always you an ID to perform any kind of look up.