Hi,
I've seen this before, but with MySQL. Kamailio is pretty strict with data types of database fields. IIRC I tried to use it with a view and the view returned a string value where Kamailio expected an integer and threw the same error. So maybe you might want to check the reference structure of the usr_preferences table under https://github.com/kamailio/kamailio/blob/master/utils/kamctl/mongodb/kamail... with your local structure.
HTH Sebastian