Switch to using abc checks for isdict/islist.