I was just wondering if there's some sort of quest item flag? I'm trying to distinguish between non-tradable and quest item (which is also non-tradable)...
The easiest way to check is to run the ash function is_displayable(); it returns true for everything but quest items, which return false. There's also an is_tradeable() function, so if you wanted to find out if an item was non-tradeable, but not a quest item, you could use this: