added handling for unexpected_typeof_a error