Fix crash if index can't be created, will just return null