Check for undefined value

If where[i].w[k] is tested for null and not also undefined then 
when saving a Model in Node-Orm2 that has a hasMany relationship defined the 
save crashes.