Only add where clause based on elementId, if it is not null. Something was going wrong when adding a new entry, so that it was returning a false positive for the validation because the elementId being checked was blank.
Merge pull request #3 from monachilada/fix-new-entry

Only add where clause based on elementId, if it is not null.
Merge remote-tracking branch 'origin/master' into develop

* origin/master:
  Only add where clause based on elementId, if it is not null. Something was going wrong when adding a new entry, so that it was returning a false positive for the validation because the elementId being checked was blank.
If elementId is empty its probably new so exclude that also