Simplified isIP() and isInt() methods