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