properly handle non-deserializable elements (eg. datetime)