Add validation to avoid pagination on empty relation