When $nick() uses a not-present nick or an invalid index number with the .color prop, it returns 0 instead of $null
This behaviour is actually present in many identifier properties. Some return a default value if no match is found, others return $null. The behaviour is somewhat arbitrary - probably based on what a particular scripter requested at the time it was implemented. In this case, this has always returned a default value.
edit: the .idle property is also returning zero for these same cases
The same applies to this property.
In general, if you want to check if something exists, you need to check for the item itself ie. $nick($chan,nick), without properties. In many cases, a return of $null for a property can be perfectly valid.