Added check for controller returning an instance of response