changed type set on error propagation to be optional as specified in
standard.
CHanged some of the code to not assume the type set being not null.