tcp/accept: check whether the object is of the proper type