do not insert empty strings or undefined
change map sintaxy
try to reduce warnings
fixed, not more passing undef instead of date to ->upsert