when converting datetime fields to isoformat() be more careful that the field value is actually of type datetime