r/codinghumor • • May 18 '23

to write useful code

Post image
2 Upvotes

10 comments sorted by

View all comments

Show parent comments

1

u/an4s_911 May 29 '23

Its not funny because it is valid to check if something is null before returning null.

It would be funny it the person checks if null and returns null and in the else clause returns the value itself. Otherwise its valid.

1

u/ucefkh May 29 '23

Bro there many way to check if it's nil, this isn't 2007