if someone want to inform users instead of converting numbers I found a trick

$add_val=check_input($_POST[‘add_val’]);

$add_val=($add_val-$add_val)+$add_val; // trick

if(!(is_int($add_val)))
{
echo “its not int”;
}