** Added null-checks into rest ObjectFactory