Avoid NPE in ContextLoader when dealing with an untyped ApplicationContextInitializer

Issue: SPR-10449
Consistent use of Class<?> in Assert