protected function castAttribute($key, $value)
	{
		$type = $this->cast[$key];

		try {
			if ( is_null($value) ) {
				return null;
			}
			
			if ( settype($value, $type) ) {
				return $value;
			}
			throw new EloquentTypecastException("Value could not be cast to type \"$type\"", 1);
		} catch (\Exception $e) {
			throw new EloquentTypecastException("Value could not be cast to type \"$type\"", 1);
		}
	}