added option to control value casting.

this is a "workaround" for not having a numeric field with integer and float descendants.