Use string comparison of user :uid/:gid

String comparison is slightly safer than integer comparison
in cases where :uid/:gid are nil or empty.