throwIfInvalid

abstract fun throwIfInvalid(): T

Throws an Exception if the object is invalid