Changes to enable validation for objects generated by InputFormatters.

UnitTests + FunctionalTests for the same.
No. `is` returns only a `bool`. But we need the actual casted object here.