improve fix for #269 - handle nulls better :)