Add test to avoid adding null to the index