Null handling fixes.