public function getAttribute($key, $subKey = null)
    {
        if (! $key) {
            return;
        }

        // We'll normalize the given key to prevent case sensitivity issues.
        $key = $this->normalizeAttributeKey($key);

        if (is_null($subKey) && $this->hasAttribute($key)) {
            return $this->attributes[$key];
        } elseif ($this->hasAttribute($key, $subKey)) {
            return $this->attributes[$key][$subKey];
        }
    }