Only allow real classes for the query