We should allow a null tenantTypeId. See note in WhereOptimizer. We should also allow a null tenantId with a non null typeId, but that's fine for another day.