Prefer passing UUID objects in query

Change-Id: I7069fe0cc931ccd71e9ec9e5c7785d6acabc2b2e