Check for class property in query