reinstated check for object validity.
added test to call validate with missing object.
removed unncessary code. minor change to tests.