Fixed NPE
Call getItems only if code list is not "external""