Fix processing of ManyToManyField when it is empty

Signed-off-by: Fernando Rocha <fernandogrd@gmail.com>