Don't try to call trigger on empty cells.
Remove code duplication.