detect type of object on collision