private function checkSize(&$size)
    {
        if ( ! NumberChecker::isIntValue($size)) {
            throw new Exceptions\InvalidImageSizeException(
                'Avatar size specified must be an integer.'
            );
        }

        $size = (int) $size;

        if ( ! NumberChecker::isIntBetween($size, 0, 512)) {
            throw new Exceptions\InvalidImageSizeException(
                'Avatar size must be within 0 pixels and 512 pixels.'
            );
        }
    }