JSON serialization: Don't raise TypeError for unknown types