Is_numeric()
is_int()
Restarted PHP on the server and it works out well now. Have no idea of why it occored though. Thanks everybody for their help!