cast non string types to string when using an encrypted string