added null check when filtering elements
changed logging which was causing error, reading _id on null
fix bad logging on email sender