dict comprehension encoding now handles NoneTypes