Need to catch `ClassCastException` (in case the subclass does not declare types).

Also, this will only work for immediate subclasses, right?