Here you would want to check the if again because you need to determine if you're checking dislikes or likes.
so: 
`
var oppositeList
if(liked) 
  oppositeList = data.Item.Dislikes.SS;
else
  oppositeList = data.Item.Likes.SS;
`
You should also just return (oppositeList.indexOf(paperId) != -1)