Added protection against series that are functions or inherited objects.