Check valid integer in PHP