NPE-proofing all the runtimeType code