Handle TypeError on flattening