Ensure correct handling of nulls on js side