I would do it like this:
1. Change the definition of FN myGetWDrefNumFromAlias% so that it only takes theAliasNum% parameter (remove the itemType% parameter)
2. Inside the FN, after the "LONG IF myErr% = _noErr" line, add this line:
itemType% = FN WhatType(fsSpec)
Here's the WhatType function, which will return the type. (Caution: it's untested):
LOCAL FN WhatType(@fsSpecAddr&)
DIM fSpec;0, fVrefNum%, fParID&, 63 fileName$
DIM pb.108
fSpec;70 = fsSpecAddr&
pb.ioNamePtr& = @fileName$
pb.ioVRefNum% = fVrefNum%
pb.ioDirID& = fParID&
pb.ioFDirIndex% = 0
OSErr% = FN GETCATINFO(@pb)
SELECT CASE
CASE OSErr% < 0
theType = OSErr% 'return error code
CASE (PEEK(@pb.ioFlAttrib) AND BIT(4)) = 0
theType = _isFile
CASE ELSE
IF pb.ioDrParID& = 1 THEN theType = _isDisk ELSE theType = _isFolder
END SELECT
END FN = theType