now properly pack NULL values