Return nil for nil collections in ASTIndexBy