Assert before querying