You can check if user is a member of a k2 role by executing the Get Role Users of the UMUser smartobject. If you want to do it within a k2 process, then use inline function (Text- contains).
Smartobject service tester is described at _http://jeylabsblog.com/2009/02/15/smartobject-service-tester/
Once you opened the smartobject service tester, expand smartobject explorer > all smartobjects > right-click on UMUsers. Then select the method to execute (Role to users), type in the input (role name) and click on execute.