Replace type check with attribute check for arg to add_to_queue