Updated package type check