Refactoring into new assertTypeExistence method
Now throws CompilationException if type in method parameter does not exist