Corrected issue where the score (of the type Number) was assigned to NaN values.

Corrected issue where the score (of the type Number) was assigned to NaN values when trying to get preferred languages of an entity.