change isinstance checking