Handle nulls properly.