Added support for both reference and value types in the If construct.