SyntaxFix
Write A Post
Hire A Developer
Questions
I would use the first one. It is clear to see right away what it does. I dont think the null check is necessary here.