I replaced console.assert with code to deal with null args.