fixed bug where non-Error type objects were still errors and not being thrown