Deprecate isValidClass

Fixes #2374
Merge pull request #2384 from sebmarkbage/deprecateisvalidclass

Deprecate isValidClass