public function setUsername($username)
    {
        if (!is_null($username) && !is_string($username)) {
            $argumentType = (is_object($username)) ? get_class($username) : gettype($username);
            throw new \InvalidArgumentException('Expected username as string; got ' . $argumentType);