Eagerly reject invalid values to ClassName.fromClass.

Refs #79.