Checks for ID with _.has instead of if (val.id)

This accepts "falsish" values like 0.
Fixes #11