fix NPE for types without a package