I also think the name of this function implies it only checks, but it is actually doing two things.