protected static function tryGetValue($provider, $object, $propertyName, &$error)
    {
        try {
            return call_user_func(array($provider, 'getValue'), $object, $propertyName);
        } catch (\InvalidArgumentException $e) {
            $error = $e;
            return null;
        }
    }