Fail on import “types”

When importing “types” to use types.isType(), the error “unidentified identifier types” shows up. Is types no more available? If it’s not, is there another way of checking the type of a variable. For example giving True if it’s a string?