---
title: "Discussion on \"Refactoring 029 - Replace NULL With Collection\" | Hashnode"
description: "Discussion on \"Refactoring 029 - Replace NULL With Collection\". Transform optional attributes into empty collections for cleaner, safer, and polymorphic code, banishing the billion-dollar mistake"
url: "https://hashnode.com/posts/refactoring-029-replace-null-with-collection/683ce3a32d789d42a661827b"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Refactoring 029 - Replace NULL With Collection](https://maximilianocontieri.com/refactoring-029-replace-null-with-collection?utm_source=hashnode&utm_medium=feed)

Transform optional attributes into empty collections for cleaner, safer, and polymorphic code, banishing the billion-dollar mistake

Jun 1, 2025 · 4 min read · maximilianocontieri.com  
Updated Jun 7, 2025  
Read the article

-   [#programming](https://hashnode.com/tag/programming)
-   [#null](https://hashnode.com/tag/null)
-   [#code-smell-1](https://hashnode.com/tag/code-smell-1)
-   [#clean-code](https://hashnode.com/tag/clean-code)
-   [#refactoring](https://hashnode.com/tag/refactoring)

## Written by

[Maxi Contieri](https://hashnode.com/@mcsee)

@mcsee · Buenos Aires

  
[View profile](https://hashnode.com/@mcsee)

Software Engineer

I’m a senior software engineer loving clean code, and declarative designs. S.O.L.I.D. and agile methodologies fan.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
