Eagerly reject invalid values to ClassName.fromClass.

Refs #79.
I'm also following a pattern that's already present in the file. We can overhaul failure testing later.