Most OO languages have type systems not fitting for such checks, though. Thus runtime checks, often a part of a setter.