Successfully validate int as float type

An integer can be used where a float is required since it is implicitly upcast
if needed. This is particularly relevant for data that originates from parsing
a string (e.g. JSON), where a number with no decimal places will be
represented as an integer.