Add value_before_type_cast method (for use Settings in forms)

Signed-off-by: Yauhen Kharuzhy <jekhor@gmail.com>