NPE-proofing all the runtimeType code
JBIDE-17267 - protect against bad module implementations