Properly report errors for failed type assertions
Merge pull request #618 from Microsoft/typeAssertionErrors

Properly report errors for failed type assertions