code: public static boolean isPackageValid(final Class type) {
          boolean res = false;
          if (type != null) {
              final Package packaj = type.getPackage();
              res = !(packaj == null || packaj.getName().startsWith("java"));
          }
          return res;
      }
docs: Important check, because JDK proxies of public interfaces have no package
  (thanks to @binkley https://github.com/99soft/lifegycle/pull/5).
  
  @param type class type to check
  @return true if package could be resolved, false otherwise