code: protected Object checkUserAgent(ServerUserHandlerClass handler, ApiUser userAgent) {
          if(handler.getUserClass().isAssignableFrom(userAgent.getClass()))
              return userAgent;
          return UserAgentUtil.getGameUser(userAgent, handler.getUserClass());
      }
docs: Check whether context of user agent is application or game
  
  @param handler structure of handler
  @param userAgent user agent object
  @return user agent or game user agent object