Check for correct package type before returning it's attribute