Adding dynamic type check in case of an empty collection.
Using view instead of static functions for pdb.fast implementation.

Fixes problem with different value factories.