public static function validEmail($value)
    {
        if (is_object($value) || empty($value)) {
            throw new \InvalidArgumentException("Empty email given.");
        }

        if (!filter_var((string)$value, FILTER_VALIDATE_EMAIL)) {
            throw new \InvalidArgumentException("Invalid email address given.");
        }

        return $value;
    }