Dict validation/conversion for Swi-Prolog.