When using a query API such as:
will cause a `NullPointerException` when attempting to locate relation information.
The query API should likely throw a more relevant exception such as: