public function isBase64()
    {
        // An empty string is by definition not encoded.
        if ($this->getLength() === 0) return false;

        // Grab the current string value.
        $possiblyEncoded = $this->scalarString;

        // Attempt to decode it.
        $decoded = base64_decode($possiblyEncoded, true);

        // If we get false it can't be base64
        if ($decoded === false) return false;

        // Lets double check
        return (base64_encode($decoded) === $this->scalarString);
    }