rescue TypeError on unknown object and do not cache

@staugaard