Improve error checking in ly:assoc-get and ly:chain-assoc-get.