Fixes interaction trails bug introduced by removal of instanceof operator