Add exception classes.
Added assertion method for checking value type.