Correct some type checks