public static function isValidIp($sIp, $sType = null)
    {
        switch (strtoupper($sType)) {
            case 'IPV4':
                return filter_var($sIp, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4);
                break;
            case 'IPV6':
                return filter_var($sIp, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6);
                break;
            default:
                return filter_var($sIp, FILTER_VALIDATE_IP);
                break;
        }
    }