legacy: get_most_popular_field_values fix

* Properly checks if tags parameter is of string type.

Signed-off-by: Javier Martin Montull <javier.martin.montull@cern.ch>