Added the ability to override automatic casting of values