Why is this explicit check for `NULL` needed?