Merge the two conditions?
return false if uid.nil? or uid.to_i == 0