it's not wrong to keep it here, but it would be redundant since the null check is now done by callers of the function.