check type and subtype for UBFile objects