added check if popularity value is a number