Only wrap View classes if they've actually classes.

This should avoid wrapping it twice, where it'll fail the second time
because it can't create an instance of a function.