[Fixes #1104] Fix EachWithObject with modifier if

Also add check for empty body.