$input = 999.00;
$type = \XF\Mvc\Entity\Entity::FLOAT;
$output = \XF::em()->getValueFormatter()->castValueToType($input, $type, []);
var_dump($input); // float(999)
var_dump($output); // int(999)
This is not big problem, if we're not working with entities:
$item =...