__construct checks now if Serializer is given and of correct type before passing it to setSerializer