Fix "not a class" crasher in live variable analysis

Predicate the `asClass` cast with an `isClass` check.

Fixes #63