Newbie: Checking whether an object is present in a room

I've been looking in vain for 'object is in room' alongside 'player is in room' and the other entries in the 'if' script expression drop-down. How in the Quest UI can I check whether a particular object is present in a particular room?

An object (including the player) is in a room if the object's parent is the room (ignoring things like objects being inside containers. That adds another level. If you need that, then we can work it out).

So if you have an object "apple" and a room "kitchen", then the apple is in the kitchen if "apple.parent = kitchen".

Many thanks Jaynabonne!